1.0.3 • Published 6 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.
reference
is expected as aProvider
, like a self-reference.limit
is 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:
limit
is the instancing roof.factored
is aDictionary
of instances.
.factor()
Factors a new instance.
- Does not accept any arguments.