deno.land / x / lodash@4.17.19 / npm-package / _listCacheSet.js

_listCacheSet.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var assocIndexOf = require('./_assocIndexOf');
/** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this;}
module.exports = listCacheSet;
lodash

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉