1.0.3 • Published 8 years ago
@sugarcoated/fondant-provider v1.0.3
Provider extends Module to resemble a factory and produce enviromentally dependant singletons.
API Reference
new Provider(reference, limit)
Creates a new Provider instance.
referenceis expected as aProvider, like a self-reference.limitis expected as aNumber, representing the instancing roof.class myProvider extends Provider { constructor (a, b, c) { super (myProvider); } }
Upon construction, you will have access to the following properties:
limitis the instancing roof.factoredis aDictionaryof instances.
.factor()
Factors a new instance.
- Does not accept any arguments.