Last change
on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
450 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var getMapData = require('./_getMapData');
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * Removes `key` and its value from the map.
|
---|
| 5 | *
|
---|
| 6 | * @private
|
---|
| 7 | * @name delete
|
---|
| 8 | * @memberOf MapCache
|
---|
| 9 | * @param {string} key The key of the value to remove.
|
---|
| 10 | * @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
---|
| 11 | */
|
---|
| 12 | function mapCacheDelete(key) {
|
---|
| 13 | var result = getMapData(this, key)['delete'](key);
|
---|
| 14 | this.size -= result ? 1 : 0;
|
---|
| 15 | return result;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | module.exports = mapCacheDelete;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.