1.0.0 • Published 4 years ago
@jeydolen/generic_singleton v1.0.0
Singleton
Singleton is a Javascript module used to force process to use one process
Installation
Use the node package manager to install.
npm install @jeydolen/generic_singleton
Usage
const Singleton = require ('@jeydolen/generic_singleton')
class test extends Singleton
{
static Singleton = test.GetSingleton();
constructor(args)
{
super (args)
}
show_msg ( msg )
{
console.log ( msg );
}
}
const unit_test = ( args ) =>
{
// test.show_msg; ( not working )
test.GetSingleton().show_msg(('test');
};
unit_test();
License
1.0.0
4 years ago