index.js 812 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * lodash 4.0.0 (Custom Build) <https://lodash.com/>
  3. * Build: `lodash modularize exports="npm" -o ./`
  4. * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  5. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  6. * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7. * Available under MIT license <https://lodash.com/license>
  8. */
  9. /**
  10. * Checks if `value` is `null` or `undefined`.
  11. *
  12. * @static
  13. * @memberOf _
  14. * @category Lang
  15. * @param {*} value The value to check.
  16. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  17. * @example
  18. *
  19. * _.isNil(null);
  20. * // => true
  21. *
  22. * _.isNil(void 0);
  23. * // => true
  24. *
  25. * _.isNil(NaN);
  26. * // => false
  27. */
  28. function isNil(value) {
  29. return value == null;
  30. }
  31. module.exports = isNil;