globalizer

0.2.2 • Public • Published

node-globalizer

This node.js module will load a collection of modules and expose them as GLOBAL.

Install it

npm install globalizer --save

Use it

require('globalizer')(['path', 'assert', {
    _: 'lodash',
    gutil: 'gulp-util',
    request: 'supertest',
    Deferred: 'JQDeferred',
    io: 'socket.io-client',
    config: '../../config'
}]);

Is identical to :

GLOBAL.path = require('path');
GLOBAL.assert = require('assert');
GLOBAL._ = require('lodash');
GLOBAL.gutil = require('gulp-util');
GLOBAL.request = require('supertest');
GLOBAL.Deferred = require('JQDeferred');
GLOBAL.io = require('socket.io-client');
GLOBAL.config = require('../../config');

Readme

Keywords

Package Sidebar

Install

npm i globalizer

Weekly Downloads

12

Version

0.2.2

License

MIT

Last publish

Collaborators

  • g33klabs