From a1d3c42fae27771f6d391bde051133d15767342a Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 29 Aug 2017 11:42:21 +0100 Subject: [PATCH] remove deprecated lodash.isarray --- package.json | 1 - rollup.config.js | 1 - src/components/ngRedux.js | 3 ++- yarn.lock | 4 ---- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 8aa753f..02055f2 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "dependencies": { "invariant": "^2.2.2", "lodash.curry": "^4.1.1", - "lodash.isarray": "^4.0.0", "lodash.isfunction": "^3.0.8", "lodash.isobject": "^3.0.2", "lodash.isplainobject": "^4.0.6", diff --git a/rollup.config.js b/rollup.config.js index b510784..3aaa3f2 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -15,7 +15,6 @@ if (env === 'es' || env === 'cjs') { config.external = [ 'invariant', 'lodash.curry', - 'lodash.isarray', 'lodash.isfunction', 'lodash.isobject', 'lodash.isplainobject', diff --git a/src/components/ngRedux.js b/src/components/ngRedux.js index 49bf9e3..4b86840 100644 --- a/src/components/ngRedux.js +++ b/src/components/ngRedux.js @@ -4,10 +4,11 @@ import {createStore, applyMiddleware, compose, combineReducers} from 'redux'; import digestMiddleware from './digestMiddleware'; import curry from 'lodash.curry'; -import isArray from 'lodash.isarray'; import isFunction from 'lodash.isfunction'; import map from 'lodash.map'; +const isArray = Array.isArray; + const typeIs = curry((type, val) => typeof val === type); const isObject = typeIs('object'); const isString = typeIs('string'); diff --git a/yarn.lock b/yarn.lock index a3b389a..88824e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1508,10 +1508,6 @@ lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" -lodash.isarray@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-4.0.0.tgz#2aca496b28c4ca6d726715313590c02e6ea34403" - lodash.isfunction@^3.0.8: version "3.0.8" resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.8.tgz#4db709fc81bc4a8fd7127a458a5346c5cdce2c6b"