Version 1
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / isSet.js
diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/isSet.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/isSet.js
new file mode 100644 (file)
index 0000000..e1d50be
--- /dev/null
@@ -0,0 +1,27 @@
+var getTag = require('./_getTag'),
+    isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var setTag = '[object Set]';
+
+/**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+function isSet(value) {
+  return isObjectLike(value) && getTag(value) == setTag;
+}
+
+module.exports = isSet;