is-nil

v1.0.0arrow_drop_down
v1.0.0
v0.0.1
STATUS
Passing
DOWNLOADS
28
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 years ago
SIZE
482 B
determines whether `val` reference is null or undefined.
2 contributors
Install is-nil as a package?
Copied
npm i @bit/bit.utils.validation.is-nil
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
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 passed

Pass

#isNil() should return true if undefined is passed

Pass

#isNil() should return false as an empty string was passed

Pass

#isNil() should return false as an empty object was passed

Pass

#isNil() should return false as a number was passed

Pass
Help and resources