my-idlers/node_modules/collect.js/dist/methods/zip.js
cp6 fd22b0bf58 V2 (Laravel re-make)
V2 (Laravel re-make)
2022-03-06 02:02:12 +11:00

17 lines
342 B
JavaScript

'use strict';
module.exports = function zip(array) {
var _this = this;
var values = array;
if (values instanceof this.constructor) {
values = values.all();
}
var collection = this.items.map(function (item, index) {
return new _this.constructor([item, values[index]]);
});
return new this.constructor(collection);
};