0.1.0 • Published 10 years ago
1t v0.1.0
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
0.1.0
10 years ago