UNPKG

537 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4var group_to_map_1 = (0, tslib_1.__importDefault)(require("./group-to-map"));
5exports.default = (function (data, condition) {
6 if (!condition) {
7 // 没有条件,则自身改成数组
8 return [data];
9 }
10 var groups = (0, group_to_map_1.default)(data, condition);
11 var array = [];
12 for (var i in groups) {
13 array.push(groups[i]);
14 }
15 return array;
16});
17//# sourceMappingURL=group.js.map
\No newline at end of file