open-index/open-npm huggingface dataset:
npm package: @fdv/singleton
Description: Node.js Singleton helper class
Author: Mohamad Fadavi
Latest version: 1.0.0

# Singleton
  v1.0.0

## Install
```
$ npm i --save @fadavi/singleton
```

## Usage
```javascript
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