nan-mixin
v1.1.1
Published
Library to ease the use of mixins in JS
Downloads
2
Readme
Mixin library
Library to ease the use of mixins in JS. You can see how the library works checking the tests we added.
Methods provided
mixOf(target, mixin)
Merges the attributes of mixin to the prototype of target.
| Param | Type | Description | | --- | --- | --- | | target | function | Constructor of the class that will be merged with the mixins | | mixin | Object | Array | Object (or array of objects) that contains the attributes and methods to be merged with target. |
create(name, mixinProperties) ⇒ Object
Creates a Mixin object with the name and methods passed as parameters.
| Param | Type | Description | | --- | --- | --- | | name | String | Name of the Mixin. | | mixinProperties | Object | Properties to be added to the Mixin |