bit/utils/global/is-nil

determines whether val reference is null or undefined.

0 Likes
Use in your codeLearn 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