nc-singleton
A simple singleton module to be used inside your constructor.
Usage
Let's assume you are working on a module. You use prototype and you want that all your new statements return the same instance.
'use strict'; var singleton = ; var { return singleton;}; Cacheprototype { thistime = ;}; Cacheprototype { return thistime;}; var cache = cache;console; ;
It also works with ES6
'use strict'; var singleton = ; let instance = null; { return singleton; } { thistime = ; } { return thistime; } let cache = cache;console; ;
For testing just npm test :)
That's it.