Gravatar for undefined
Log in to like
6 Likes

determines whether val reference is null or undefined.

Use in your code Learn more
bit import bit.utils/global/is-nil

isNil (val: *) : boolean

determines whether `val` reference is null or undefined.

Example

 isNil(null) // => true
 isNil('') // => true

Argument

val: *

Returns

boolean

Test Summary

#isNil() should return true if null is passedPass
#isNil() should return true if undefined is passedPass
#isNil() should return false as an empty string was passedPass
#isNil() should return false as an empty object was passedPass
#isNil() should return false as a number was passedPass