UNPKG

476 BJavaScriptView Raw
1import getTag from './_getTag.js';
2import isObjectLike from './isObjectLike.js';
3
4/** `Object#toString` result references. */
5var setTag = '[object Set]';
6
7/**
8 * The base implementation of `_.isSet` without Node.js optimizations.
9 *
10 * @private
11 * @param {*} value The value to check.
12 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
13 */
14function baseIsSet(value) {
15 return isObjectLike(value) && getTag(value) == setTag;
16}
17
18export default baseIsSet;