redux-storage
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -7,4 +7,12 @@ 'use strict'; | ||
var _lodash = require('lodash'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _lodashSet = require('lodash.set'); | ||
var _lodashSet2 = _interopRequireDefault(_lodashSet); | ||
var _lodashIsfunction = require('lodash.isfunction'); | ||
var _lodashIsfunction2 = _interopRequireDefault(_lodashIsfunction); | ||
exports['default'] = function (engine) { | ||
@@ -39,3 +47,3 @@ var whitelist = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; | ||
// Support immutable structures | ||
if ((0, _lodash.isFunction)(value.has) && (0, _lodash.isFunction)(value.get)) { | ||
if ((0, _lodashIsfunction2['default'])(value.has) && (0, _lodashIsfunction2['default'])(value.get)) { | ||
if (!value.has(keyPart)) { | ||
@@ -55,3 +63,3 @@ // No value stored - continue whiteliste.forEach! | ||
(0, _lodash.set)(saveState, key, value); | ||
(0, _lodashSet2['default'])(saveState, key, value); | ||
}); | ||
@@ -58,0 +66,0 @@ |
@@ -7,4 +7,12 @@ 'use strict'; | ||
var _lodash = require('lodash'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _lodashMerge = require('lodash.merge'); | ||
var _lodashMerge2 = _interopRequireDefault(_lodashMerge); | ||
var _lodashIsfunction = require('lodash.isfunction'); | ||
var _lodashIsfunction2 = _interopRequireDefault(_lodashIsfunction); | ||
var _immutable = require('immutable'); | ||
@@ -15,9 +23,9 @@ | ||
function myMerge(oldState, newState) { | ||
if ((0, _lodash.isFunction)(oldState.mergeDeep)) { | ||
if ((0, _lodashIsfunction2['default'])(oldState.mergeDeep)) { | ||
return oldState.mergeDeep(newState); | ||
} | ||
if ((0, _lodash.isFunction)(newState.mergeDeep)) { | ||
if ((0, _lodashIsfunction2['default'])(newState.mergeDeep)) { | ||
return (0, _immutable.fromJS)(oldState).mergeDeep(newState); | ||
} | ||
return (0, _lodash.merge)({}, oldState, newState); | ||
return (0, _lodashMerge2['default'])({}, oldState, newState); | ||
} | ||
@@ -24,0 +32,0 @@ |
{ | ||
"name": "redux-storage", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Persistence layer for redux with flexible backends", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "make test", | ||
"test": "make ci", | ||
"prepublish": "make ci build" | ||
@@ -32,20 +32,22 @@ }, | ||
"devDependencies": { | ||
"babel": "^5.8.23", | ||
"babel-core": "^5.8.25", | ||
"babel-eslint": "^4.1.3", | ||
"chai": "^3.2.0", | ||
"chai-as-promised": "^5.1.0", | ||
"chai-string": "^1.1.2", | ||
"eslint": "^1.5.0", | ||
"babel": "5.8.23", | ||
"babel-core": "5.8.25", | ||
"babel-eslint": "4.1.3", | ||
"chai": "3.3.0", | ||
"chai-as-promised": "5.1.0", | ||
"chai-string": "1.1.3", | ||
"eslint": "1.5.1", | ||
"eslint-config-airbnb": "0.0.8", | ||
"eslint-plugin-react": "^3.4.2", | ||
"mocha": "^2.3.2", | ||
"sinon": "^1.16.1", | ||
"sinon-as-promised": "^4.0.0", | ||
"sinon-chai": "^2.8.0" | ||
"eslint-plugin-react": "3.5.1", | ||
"mocha": "2.3.3", | ||
"sinon": "1.17.1", | ||
"sinon-as-promised": "4.0.0", | ||
"sinon-chai": "2.8.0" | ||
}, | ||
"dependencies": { | ||
"lodash": "3.10.x", | ||
"immutable": "^3.7.5", | ||
"redux-actions": "0.8.x" | ||
"immutable": "3.7.5", | ||
"lodash.isfunction": "^3.0.6", | ||
"lodash.merge": "^3.3.2", | ||
"lodash.set": "^3.7.4", | ||
"redux-actions": "0.8.0" | ||
}, | ||
@@ -52,0 +54,0 @@ "peerDependencies": { |
@@ -8,2 +8,3 @@ [redux-storage][] | ||
[![Code Climate](https://codeclimate.com/github/michaelcontento/redux-storage/badges/gpa.svg)](https://codeclimate.com/github/michaelcontento/redux-storage) | ||
[![build](https://travis-ci.org/michaelcontento/redux-storage.svg)](https://travis-ci.org/michaelcontento/redux-storage) | ||
@@ -10,0 +11,0 @@ Save and load the [Redux][] state with ease. |
Sorry, the diff of this file is not supported yet
20518
254
206
6
+ Addedlodash.isfunction@^3.0.6
+ Addedlodash.merge@^3.3.2
+ Addedlodash.set@^3.7.4
+ Addedimmutable@3.7.5(transitive)
+ Addedlodash._arraycopy@3.0.0(transitive)
+ Addedlodash._arrayeach@3.0.0(transitive)
+ Addedlodash._basecopy@3.0.1(transitive)
+ Addedlodash._bindcallback@3.0.1(transitive)
+ Addedlodash._createassigner@3.1.1(transitive)
+ Addedlodash._getnative@3.9.1(transitive)
+ Addedlodash._isiterateecall@3.0.9(transitive)
+ Addedlodash._topath@3.8.1(transitive)
+ Addedlodash.isfunction@3.0.9(transitive)
+ Addedlodash.istypedarray@3.0.6(transitive)
+ Addedlodash.keys@3.1.2(transitive)
+ Addedlodash.merge@3.3.2(transitive)
+ Addedlodash.restparam@3.6.1(transitive)
+ Addedlodash.set@3.7.4(transitive)
+ Addedlodash.toplainobject@3.0.0(transitive)
- Removedlodash@3.10.x
- Removedimmutable@3.8.2(transitive)
- Removedlodash@3.10.1(transitive)
Updatedimmutable@3.7.5
Updatedredux-actions@0.8.0