@antv/layout
Version:
graph layout algorithm
36 lines (29 loc) • 845 B
JavaScript
import { __require as require_getMapData } from './_getMapData.js';
var _mapCacheSet;
var hasRequired_mapCacheSet;
function require_mapCacheSet () {
if (hasRequired_mapCacheSet) return _mapCacheSet;
hasRequired_mapCacheSet = 1;
var getMapData = require_getMapData();
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
_mapCacheSet = mapCacheSet;
return _mapCacheSet;
}
export { require_mapCacheSet as __require };
//# sourceMappingURL=_mapCacheSet.js.map