ad6cd6c07ce15bb78feb274f0eb59e078dd7b808
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / hashDelete.js
1 var hashHas = require('./hashHas');
2
3 /**
4  * Removes `key` and its value from the hash.
5  *
6  * @private
7  * @param {Object} hash The hash to modify.
8  * @param {string} key The key of the value to remove.
9  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
10  */
11 function hashDelete(hash, key) {
12   return hashHas(hash, key) && delete hash[key];
13 }
14
15 module.exports = hashDelete;