Comparing version 1.0.5 to 1.0.6
21
index.js
@@ -34,2 +34,20 @@ import Store from "./makes/Store"; | ||
export const mixin = function(mixin) { | ||
return function(component) { | ||
for(let i in mixin) { | ||
if(!component.prototype[i]) { | ||
component.prototype[i] = mixin[i]; | ||
} | ||
// else { | ||
// component.prototype[i] = (function(name, func, func1) { | ||
// func.apply(this, arguments); | ||
// func1.apply(this, arguments); | ||
// })(i, mixin[i], component.prototype[i]); | ||
// } | ||
} | ||
return component; | ||
}; | ||
}; | ||
export const compose = function() { | ||
@@ -61,3 +79,4 @@ let composes = []; | ||
"compose": compose, | ||
"createStore": createStore | ||
"createStore": createStore, | ||
"mixin": mixin | ||
}; |
{ | ||
"name": "kpdux", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"author": "Kris Papercut <kearis666@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
9054
270