1 var assocIndexOf = require('./_assocIndexOf');
3 /** Used for built-in method references. */
4 var arrayProto = Array.prototype;
6 /** Built-in value references. */
7 var splice = arrayProto.splice;
10 * Removes `key` and its value from the list cache.
15 * @param {string} key The key of the value to remove.
16 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
18 function listCacheDelete(key) {
19 var data = this.__data__,
20 index = assocIndexOf(data, key);
25 var lastIndex = data.length - 1;
26 if (index == lastIndex) {
29 splice.call(data, index, 1);
35 module.exports = listCacheDelete;