Files
lodash/isSet.js
John-David Dalton efcf51c7bf Remove unary helpers.
2017-01-09 17:31:54 -08:00

29 lines
583 B
JavaScript

import baseIsSet from './_baseIsSet.js';
import nodeUtil from './_nodeUtil.js';
/* Node.js helper references. */
const nodeIsSet = nodeUtil && nodeUtil.isSet;
/**
* Checks if `value` is classified as a `Set` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
* @example
*
* _.isSet(new Set);
* // => true
*
* _.isSet(new WeakSet);
* // => false
*/
const isSet = nodeIsSet
? value => nodeIsSet(value)
: baseIsSet;
export default isSet;