chore: use typeof instead of lodash/isBoolean (#4604)

This commit is contained in:
Julien Fontanet
2019-10-14 13:51:45 +02:00
committed by GitHub
parent 541d90e49f
commit 654fd5a4f9
2 changed files with 1 additions and 3 deletions

View File

@@ -256,7 +256,6 @@ export const safeDateParse = utcParse('%Y%m%dT%H%M%SZ')
//
// Exports them from here to avoid direct dependencies on lodash/
export { default as forEach } from 'lodash/forEach'
export { default as isBoolean } from 'lodash/isBoolean'
export { default as isEmpty } from 'lodash/isEmpty'
export { default as isInteger } from 'lodash/isInteger'
export { default as isObject } from 'lodash/isObject'

View File

@@ -9,7 +9,6 @@ import { satisfies as versionSatisfies } from 'semver'
import {
camelToSnakeCase,
forEach,
isBoolean,
isInteger,
isString,
map,
@@ -43,7 +42,7 @@ export const prepareXapiParam = param => {
if (isInteger(param)) {
return asInteger(param)
}
if (isBoolean(param)) {
if (typeof param === 'boolean') {
return asBoolean(param)
}
if (Array.isArray(param)) {