Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "fluxury", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "Add luxury sugar to simplify implementing Facebook's flavor of Flux architecture.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -252,5 +252,5 @@ # fluxury | ||
var {SET, DELETE} = createActions('SET', 'DELETE'); | ||
var Immutable = require('Immutable'); | ||
var {Map} = require('Immutable'); | ||
var store = Fluxury.createStore('MapStore', Immutable.Map(), function(state, action) { | ||
var store = createStore('MapStore', Map(), function(state, action) { | ||
t.plan(8) | ||
@@ -265,5 +265,3 @@ switch (action.type) { | ||
}, { | ||
getStates: (state) => state.get('states'), | ||
getPrograms: (state) => state.get('programs'), | ||
getSelectedState: (state) => state.get('selectedState'), | ||
get: (state, param) => state.get(param), | ||
has: (state, param) => state.has(param), | ||
@@ -270,0 +268,0 @@ includes: (state, param) => state.includes(param), |
10
test.js
@@ -99,5 +99,3 @@ var test = require('tape'); | ||
}, { | ||
getStates: (state) => state.get('states'), | ||
getPrograms: (state) => state.get('programs'), | ||
getSelectedState: (state) => state.get('selectedState'), | ||
get: (state, param) => state.get(param), | ||
has: (state, param) => state.has(param), | ||
@@ -114,5 +112,5 @@ includes: (state, param) => state.includes(param), | ||
t.deepEqual( store.queries.getStates().toJS(), ['CA', 'OR', 'WA'] ); | ||
t.deepEqual( store.queries.getPrograms().toJS(), [{ name: 'A', states: ['CA']}] ); | ||
t.deepEqual( store.queries.getSelectedState(), 'CA' ); | ||
t.deepEqual( store.queries.get('states').toJS(), ['CA', 'OR', 'WA'] ); | ||
t.deepEqual( store.queries.get('programs').toJS(), [{ name: 'A', states: ['CA']}] ); | ||
t.deepEqual( store.queries.get('selectedState'), 'CA' ); | ||
t.deepEqual( store.queries.all(), { states: ['CA', 'OR', 'WA'], programs: [{ name: 'A', states: ['CA']}] , selectedState: 'CA' } ); | ||
@@ -119,0 +117,0 @@ |
17280
233
276