Comparing version 1.2.1 to 1.3.0
@@ -155,7 +155,4 @@ /* fluxury - Copyright 2015 Peter Moresi */ | ||
return { | ||
id: count, | ||
remove: function remove() { | ||
emitter.removeListener('changed', cb); | ||
} | ||
return function () { | ||
emitter.removeListener('changed', cb); | ||
}; | ||
@@ -162,0 +159,0 @@ }, |
{ | ||
"name": "fluxury", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Add luxury sugar to simplify implementing Facebook's flavor of Flux architecture.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -146,7 +146,4 @@ /* fluxury - Copyright 2015 Peter Moresi */ | ||
return { | ||
id: count, | ||
remove: () => { | ||
emitter.removeListener('changed', cb) | ||
} | ||
return () => { | ||
emitter.removeListener('changed', cb) | ||
} | ||
@@ -153,0 +150,0 @@ }, |
@@ -165,3 +165,3 @@ var test = require('tape'); | ||
t.plan(12) | ||
t.plan(11) | ||
@@ -190,8 +190,7 @@ var MessageStore = createStore('MessageStore', [], function(state, action) { | ||
var token = MessageStore.subscribe(function() { | ||
var unsubscribe = MessageStore.subscribe(function() { | ||
dispatchCount += 1 | ||
}) | ||
t.equals( typeof token, 'object') | ||
t.equals( typeof token.remove, 'function') | ||
t.equals( typeof unsubscribe, 'function') | ||
@@ -208,3 +207,3 @@ dispatch('loadMessage', 'Test') | ||
token.remove() | ||
unsubscribe() | ||
@@ -211,0 +210,0 @@ dispatch('loadMessage', 'Test3') |
52067
1096