1.117.0 • Published 9 months ago

@biorate/singleton v1.117.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Singleton

Abstract singleton class

Example:

import { Singleton } from '@biorate/singleton';

class Test extends Singleton {
  public static get() {
    return this.instance<Test>();
  }
}

const instance1 = Test.get();
const instance2 = Test.get();

console.log(instance1 === instance2); // true

Learn

  • Documentation can be found here - docs.

Release History

See the CHANGELOG

License

MIT

Copyright (c) 2021-present Leonid Levkin (llevkin)

1.117.0

9 months ago

1.113.0

9 months ago