1t
v0.1.0
Published
Ensures that only one instance of your module exists either serverside or in the browser.
Downloads
12
Maintainers
Readme
1t
Ensures that only one instance of your module exists either serverside or in the browser.
1t == one ton == a singleton
var singleton = require('1t');
// #ifndef
singleton('__FOO__', module, function () {
// #define __FOO__
var path = require('path');
exports.hello = 'world';
exports.filename = path.basename(__filename);
})
// #endif
Installation
npm install 1t
API
generated with docme
License
MIT