registry-mixin
v3.1.3
Published
Register objects and factories for later lookup
Downloads
344
Readme
registry-mixin
Register objects and factories for later lookup
API
Table of Contents
defineRegistryProperties
Register named factories register<>(Factory) unregister<>(Factory) create<>InstanceNamed(name,...args) create<>Instance(config,...args) // config.type is the name <>[name] // lookup
Format of the options { 'factoryType' : 'new' // A key word which will call a constructor '' // a function name to call function(name, arg1, arg2, arg3){} // A given function which will be called willBeUnregistered(object) // called before unregistering object hasBeenRegistered (object) // called after registering object }
Parameters
object
name
options
(optional, default{}
)
install
With npm do:
npm install registry-mixin
license
BSD-2-Clause