Skip to content

Mixin pattern but ml-mixin is implemented as a separate object that is stored on the property of the host object and can create proxy methods on the host object if required.

License

Notifications You must be signed in to change notification settings

milojs/ml-mixin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ml-mixin

Build Status npm version Code Climate Test Coverage

An abstract Mixin class. Can be subclassed using:

var MyMixin = _.createSubclass(milo.classes.Mixin, 'MyMixin');

Mixin pattern is used, but ml-mixin is implemented as a separate object that is stored on the property of the host object and can create proxy methods on the host object if required. This allows more complex behavior as mixin itself can maintain a state separate from the host object. this in proxy methods refers to Mixin instance, the reference to the host object is this._hostObject

More docs to come.

About

Mixin pattern but ml-mixin is implemented as a separate object that is stored on the property of the host object and can create proxy methods on the host object if required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published