source: imaps-frontend/node_modules/lodash/_mapCacheSet.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 489 bytes
RevLine 
[79a0317]1var getMapData = require('./_getMapData');
2
3/**
4 * Sets the map `key` to `value`.
5 *
6 * @private
7 * @name set
8 * @memberOf MapCache
9 * @param {string} key The key of the value to set.
10 * @param {*} value The value to set.
11 * @returns {Object} Returns the map cache instance.
12 */
13function mapCacheSet(key, value) {
14 var data = getMapData(this, key),
15 size = data.size;
16
17 data.set(key, value);
18 this.size += data.size == size ? 0 : 1;
19 return this;
20}
21
22module.exports = mapCacheSet;
Note: See TracBrowser for help on using the repository browser.