flavor-saver
Advanced tools
Comparing version 0.12.1 to 0.12.2
import assign from 'lodash/assign' | ||
import pick from 'lodash/pick' | ||
import isArray from 'lodash/isArray' | ||
const _ = { pick, assign } | ||
const _ = { pick, assign, isArray } | ||
export { _ } |
@@ -21,3 +21,3 @@ import { _ } from './imports/lodash' | ||
version: string, | ||
fields?: ArrayOfKeys<T> | ||
fields: ArrayOfKeys<T> = null | ||
): IFlavorSaver<T> { | ||
@@ -39,3 +39,3 @@ const localStorageKey = key + ':' + version | ||
let picked = t | ||
if (fields) { | ||
if (fields && _.isArray(fields)) { | ||
picked = _.pick(t, fields) | ||
@@ -55,3 +55,3 @@ } | ||
let picked = parsed | ||
if (fields) { | ||
if (fields && _.isArray(fields)) { | ||
picked = _.pick(parsed, fields) | ||
@@ -58,0 +58,0 @@ } |
{ | ||
"name": "flavor-saver", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"description": "Typescript Typed Local Storage Helpers", | ||
@@ -9,5 +9,3 @@ "main": "dist/index.js", | ||
"@types/node": "^11.11.0", | ||
"lodash": "^4.17.11", | ||
"react": "^16.8.3", | ||
"react-dom": "^16.8.3" | ||
"lodash": "^4.17.11" | ||
}, | ||
@@ -14,0 +12,0 @@ "devDependencies": { |
17626
2
390
- Removedreact@^16.8.3
- Removedreact-dom@^16.8.3
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-dom@16.14.0(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedscheduler@0.19.1(transitive)