@biorate/singleton
v1.117.0
Published
Abstract singleton class
Readme
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); // trueLearn
- Documentation can be found here - docs.
Release History
See the CHANGELOG
License
Copyright (c) 2021-present Leonid Levkin (llevkin)
