Files
lan-manager/web/node_modules/@antv/util/lib/flatten.js
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

24 lines
616 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var is_array_1 = require("./is-array");
/**
* Flattens `array` a single level deep.
*
* @param {Array} arr The array to flatten.
* @return {Array} Returns the new flattened array.
* @example
*
* flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]
*/
var flatten = function (arr) {
if (!is_array_1.default(arr)) {
return [];
}
var rst = [];
for (var i = 0; i < arr.length; i++) {
rst = rst.concat(arr[i]);
}
return rst;
};
exports.default = flatten;
//# sourceMappingURL=flatten.js.map