Xapi: lodash.pick() → lodash.pickBy().
This commit is contained in:
parent
201f92eb93
commit
2c719f326b
@ -97,6 +97,7 @@
|
|||||||
"lodash.keys": "^4.0.3",
|
"lodash.keys": "^4.0.3",
|
||||||
"lodash.map": "^4.2.0",
|
"lodash.map": "^4.2.0",
|
||||||
"lodash.pick": "^4.1.0",
|
"lodash.pick": "^4.1.0",
|
||||||
|
"lodash.pickby": "^4.2.0",
|
||||||
"lodash.sortby": "^4.2.0",
|
"lodash.sortby": "^4.2.0",
|
||||||
"lodash.startswith": "^4.0.0",
|
"lodash.startswith": "^4.0.0",
|
||||||
"lodash.trim": "^4.2.0",
|
"lodash.trim": "^4.2.0",
|
||||||
|
@ -9,7 +9,7 @@ import includes from 'lodash.includes'
|
|||||||
import isFunction from 'lodash.isfunction'
|
import isFunction from 'lodash.isfunction'
|
||||||
import isInteger from 'lodash.isinteger'
|
import isInteger from 'lodash.isinteger'
|
||||||
import isObject from 'lodash.isobject'
|
import isObject from 'lodash.isobject'
|
||||||
import pick from 'lodash.pick'
|
import pickBy from 'lodash.pickby'
|
||||||
import sortBy from 'lodash.sortby'
|
import sortBy from 'lodash.sortby'
|
||||||
import unzip from 'julien-f-unzip'
|
import unzip from 'julien-f-unzip'
|
||||||
import { utcFormat, utcParse } from 'd3-time-format'
|
import { utcFormat, utcParse } from 'd3-time-format'
|
||||||
@ -112,7 +112,7 @@ const asBoolean = value => Boolean(value)
|
|||||||
// }
|
// }
|
||||||
const asInteger = value => String(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 => {
|
const prepareXapiParam = param => {
|
||||||
// if (isFinite(param) && !isInteger(param)) { return asFloat(param) }
|
// if (isFinite(param) && !isInteger(param)) { return asFloat(param) }
|
||||||
|
Loading…
Reference in New Issue
Block a user