my-idlers/node_modules/collect.js/dist/methods/forget.js

11 lines
182 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function forget(key) {
if (Array.isArray(this.items)) {
this.items.splice(key, 1);
} else {
delete this.items[key];
}
return this;
};