1.0.1 • Published 9 years ago

singleton-require v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

singleton-require

When you need a single reference to a global singleton (mongoose, config, cache) shared amongst all npm modules, useful for plugin systems

Usage

Instead of calling require directly, route it through singleton-require to guarantee only one instance of the module is loaded and you have a reference to it

var config = require('singleton-require')('config');