"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var helper_1 = require("../helper"); function cross(rows, options) { var _a; var as = helper_1.mergeOptions(options || {}, { as: ['a', 'b'] }).as; var _b = tslib_1.__read(as, 2), a = _b[0], b = _b[1]; var length = rows.length; var result = []; for (var i = 0; i < Math.pow(length, 2); i++) { result.push((_a = {}, _a[a] = rows[Math.floor(i / length)], _a[b] = rows[i % length], _a)); } return result; } exports.cross = cross;