@fdv/singleton
v1.0.0
Published
Node.js Singleton helper class
Downloads
3
Readme
Singleton
v1.0.0
Install
$ npm i --save @fadavi/singleton
Usage
const Singleton = require('@fadavi/singleton');
class Foo extends Singleton {
bar() {
console.log('Foo#bar() called');
}
}
const foo1 = Foo.getInstance();
// or
const foo2 = Foo.instance;
// or
const foo3 = Foo.singleton;
License
WTFPL