deployable-mixin-instances
v0.1.0
Published
Node Instance Mixin
Downloads
2
Readme
deployable-mixin-instances
Node Instances Mixin for use with MixWith
Install
npm install deployable-mixin-instances --save
yarn add deployable-mixin-instances
Usage
const mix = require('mixwith').mix
const MixinInstances = require('deployable-mixin-instances')
class Some extends mix((class {})).with(MixinInstances) {}
let default = Some.singleton
API
getInstance(name)
Get an exiting instance, can return undefined
newInstance(name, args)
Create a new instance
fetchInstance(name, args)
Fetch an existing or create a new instance
createInstance(name, args)
Create an instance, erroring if it already exists
clearInstances()
Clear all instance stored in the class
License
deployable-mixin-instances is released under the MIT license. Copyright 2016 Matt Hoyle
https://github.com/deployable/deployable-mixin-instances