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

9 lines
201 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function implode(key, glue) {
if (glue === undefined) {
return this.items.join(key);
}
return new this.constructor(this.items).pluck(key).all().join(glue);
};