Version 1
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / hashDelete.js
diff --git a/node_modules/uncss/node_modules/lodash/internal/hashDelete.js b/node_modules/uncss/node_modules/lodash/internal/hashDelete.js
new file mode 100644 (file)
index 0000000..ad6cd6c
--- /dev/null
@@ -0,0 +1,15 @@
+var hashHas = require('./hashHas');
+
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(hash, key) {
+  return hashHas(hash, key) && delete hash[key];
+}
+
+module.exports = hashDelete;