From 2c719f326b5c18c6ca5762200a20f79a740ca31f Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Thu, 18 Feb 2016 15:45:28 +0100 Subject: [PATCH] =?UTF-8?q?Xapi:=20lodash.pick()=20=E2=86=92=20lodash.pick?= =?UTF-8?q?By().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/xapi.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 29525ba97..8f02adf73 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "lodash.keys": "^4.0.3", "lodash.map": "^4.2.0", "lodash.pick": "^4.1.0", + "lodash.pickby": "^4.2.0", "lodash.sortby": "^4.2.0", "lodash.startswith": "^4.0.0", "lodash.trim": "^4.2.0", diff --git a/src/xapi.js b/src/xapi.js index 42f7847e8..733bace00 100644 --- a/src/xapi.js +++ b/src/xapi.js @@ -9,7 +9,7 @@ import includes from 'lodash.includes' import isFunction from 'lodash.isfunction' import isInteger from 'lodash.isinteger' import isObject from 'lodash.isobject' -import pick from 'lodash.pick' +import pickBy from 'lodash.pickby' import sortBy from 'lodash.sortby' import unzip from 'julien-f-unzip' import { utcFormat, utcParse } from 'd3-time-format' @@ -112,7 +112,7 @@ const asBoolean = value => Boolean(value) // } const asInteger = value => String(value) -const filterUndefineds = obj => pick(obj, value => value !== undefined) +const filterUndefineds = obj => pickBy(obj, value => value !== undefined) const prepareXapiParam = param => { // if (isFinite(param) && !isInteger(param)) { return asFloat(param) }