Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
426 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | /**
|
---|
| 2 | * Checks if `value` is `null` or `undefined`.
|
---|
| 3 | *
|
---|
| 4 | * @static
|
---|
| 5 | * @memberOf _
|
---|
| 6 | * @since 4.0.0
|
---|
| 7 | * @category Lang
|
---|
| 8 | * @param {*} value The value to check.
|
---|
| 9 | * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
---|
| 10 | * @example
|
---|
| 11 | *
|
---|
| 12 | * _.isNil(null);
|
---|
| 13 | * // => true
|
---|
| 14 | *
|
---|
| 15 | * _.isNil(void 0);
|
---|
| 16 | * // => true
|
---|
| 17 | *
|
---|
| 18 | * _.isNil(NaN);
|
---|
| 19 | * // => false
|
---|
| 20 | */
|
---|
| 21 | function isNil(value) {
|
---|
| 22 | return value == null;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | module.exports = isNil;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.