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

11 lines
221 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function keys() {
var collection = Object.keys(this.items);
if (Array.isArray(this.items)) {
collection = collection.map(Number);
}
return new this.constructor(collection);
};