/node_modules/lodash/isSet.js

https://bitbucket.org/coleman333/smartsite · JavaScript · 27 lines · 6 code · 3 blank · 18 comment · 1 complexity · 69b99972f1579175354ab86769b0a000 MD5 · raw file

  1. var baseIsSet = require('./_baseIsSet'),
  2. baseUnary = require('./_baseUnary'),
  3. nodeUtil = require('./_nodeUtil');
  4. /* Node.js helper references. */
  5. var nodeIsSet = nodeUtil && nodeUtil.isSet;
  6. /**
  7. * Checks if `value` is classified as a `Set` object.
  8. *
  9. * @static
  10. * @memberOf _
  11. * @since 4.3.0
  12. * @category Lang
  13. * @param {*} value The value to check.
  14. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  15. * @example
  16. *
  17. * _.isSet(new Set);
  18. * // => true
  19. *
  20. * _.isSet(new WeakSet);
  21. * // => false
  22. */
  23. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  24. module.exports = isSet;