UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

14 lines (11 loc) 235 B
import { type } from '../type' import { _isArray } from './_isArray' export function isFalsy(x){ if (_isArray(x)){ return x.length === 0 } if (type(x) === 'Object'){ return Object.keys(x).length === 0 } return !x }