modularization

to use with CommonJS and NodeJS or RequireJS module formats