Members
(inner) exists
Checks if any value is both
- not undefined
- not null
(inner) isNotEmpty
Checks if value is not empty
Methods
(inner) hasDeep(path, obj) → {Boolean}
Check if a key exists at a deep path
Parameters:
Name | Type | Description |
---|---|---|
path |
Array.<String> | list of strings used as path to prop |
obj |
Object | the object to analyze |
Returns:
True if the given object has a key at the given path that is niether null or undefined
- Type
- Boolean
Example
const obj = { one: { two: { three: 'here I am' } } }
hasDeep(['one', 'two', 'three'], obj) //=> true
hasDeep(['one', 'two', 'fish'], obj) //=> false
(inner) isNilOrEmpty(val) → {Boolean}
Check whether a value of any type is Empty, Null, or undefined
Parameters:
Name | Type | Description |
---|---|---|
val |
* | any value |
Returns:
whether the value is null, undefined, or empty in terms of ramda#empty
- Type
- Boolean
Example
isNilOrEmpty({ test: 'test'}) //=> false
isNilOrEmpty([1]) //=> false
isNilOrEmpty({}) //=> true
isNilOrEmpty([]) //=> true
isNilOrEmpty('') //=> true
isNilOrEmpty(undefined) //=> true
isNilOrEmpty(null) //=> true