@fdv/singleton

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i @fdv/singleton

Weekly Downloads

1

Version

1.0.0

License

WTFPL

Unpacked Size

1.5 kB

Total Files

5

Last publish

Collaborators