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

11 lines
175 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function prepend(value, key) {
if (key !== undefined) {
return this.put(key, value);
}
this.items.unshift(value);
return this;
};