redux-supermodel
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -32,2 +32,8 @@ 'use strict'; | ||
{ | ||
if (payload === undefined) { | ||
const newState = _extends({}, state); | ||
delete newState[meta.resourceName]; | ||
return newState; | ||
} | ||
const resource = { initialized: true, busy: false, payload: payload, previous: null }; | ||
@@ -34,0 +40,0 @@ return _extends({}, state, { [meta.resourceName]: resource }); |
{ | ||
"name": "redux-supermodel", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "A package of action creator functions and reducers that deal with the state management of REST-like APIs for you... all you need is a URL!", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/MrLeebo/redux-supermodel", |
@@ -256,1 +256,3 @@ # redux-supermodel | ||
``` | ||
If you call `reset()` without any parameters, it will destroy all of the state associated with your resource, it will be as if it was brand new. |
20128
185
258