Files
tryno10/app/code/node_modules/collect.js/dist/methods/zip.js
T
2022-04-07 18:09:31 +05:30

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);
};