arlac77 / registry-mixin

Register objects and factories for later lookup
BSD 2-Clause "Simplified" License
0 stars 0 forks source link
mixin

npm License bundlejs downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities Coverage Status

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

install

With npm do:

npm install registry-mixin

license

BSD-2-Clause