Comparing version 1.0.0 to 1.0.1
@@ -19,2 +19,9 @@ const sRejectType = [ | ||
}, | ||
removeListener : function(listener) { | ||
this._listeners.splice(this._listeners.indexOf(listener), 1); | ||
}, | ||
clearListeners : function() { | ||
console.log("clearListeners"); | ||
this._listeners = []; | ||
}, | ||
hasActionType : function(type) { | ||
@@ -21,0 +28,0 @@ return this.actions.indexOf(type) >= 0; |
{ | ||
"name": "fluxdux", | ||
"version": "1.0.0", | ||
"description": "", | ||
"version": "1.0.1", | ||
"description": "Flux and Redux together", | ||
"main": "fluxdux.js", | ||
@@ -9,4 +9,12 @@ "scripts": { | ||
}, | ||
"author": "trungnq", | ||
"license": "ISC" | ||
"url": "https://github.com/nquangtrung/fluxdux", | ||
"author": { | ||
"name": "trungnq" | ||
}, | ||
"license": "ISC", | ||
"readme": "# fluxdux\r\nFlux and Redux together\r\n", | ||
"readmeFilename": "README.md", | ||
"_id": "fluxdux@1.0.0", | ||
"_shasum": "c8efa53b63373f152ef64737f51838656755b252", | ||
"_from": "fluxdux@" | ||
} |
16
store.js
@@ -16,2 +16,6 @@ var Reducer = require('./reducer.js'); | ||
function unsubcribe(actions) { | ||
actions.clearListeners(); | ||
} | ||
Store.prototype = { | ||
@@ -24,3 +28,3 @@ storeActions : null, | ||
trigger : function() { | ||
this.context.dispatch(this.storeActions.change, this); | ||
this.context.dispatch(this.storeActions.change, this.state); | ||
}, | ||
@@ -31,2 +35,9 @@ change : function(callback) { | ||
}); | ||
var unsubcriber = (function(store) { | ||
return function() { | ||
unsubcribe(store.storeActions); | ||
} | ||
})(this); | ||
return unsubcriber; | ||
}, | ||
@@ -36,2 +47,5 @@ reduce : function(action, data) { | ||
this.trigger(); | ||
}, | ||
getState : function() { | ||
return this.state; | ||
} | ||
@@ -38,0 +52,0 @@ }; |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
7257
10
225
1
3