1234567891011121314151617181920212223242526 |
- var assocIndexOf = require('./_assocIndexOf');
- 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;
|