mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Bump to v4.1.0.
This commit is contained in:
20
_stackDelete.js
Normal file
20
_stackDelete.js
Normal file
@@ -0,0 +1,20 @@
|
||||
define(['./_assocDelete'], function(assocDelete) {
|
||||
|
||||
/**
|
||||
* Removes `key` and its value from the stack.
|
||||
*
|
||||
* @private
|
||||
* @name delete
|
||||
* @memberOf Stack
|
||||
* @param {string} key The key of the value to remove.
|
||||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||||
*/
|
||||
function stackDelete(key) {
|
||||
var data = this.__data__,
|
||||
array = data.array;
|
||||
|
||||
return array ? assocDelete(array, key) : data.map['delete'](key);
|
||||
}
|
||||
|
||||
return stackDelete;
|
||||
});
|
||||
Reference in New Issue
Block a user