oberknecht-utils
Version:
Utils for oberknecht packages
11 lines (8 loc) • 359 B
text/typescript
import { extendedTypeof } from "../extendedTypeof";
/** @see https://github.com/NuroC/moomoo-in-depth/tree/main/protocol#unchunk-arrays */
export function unchunkArray(arr: Array<Array<any>>): Array<any> {
if (extendedTypeof(arr) !== "array") return [];
let r: Array<any> = [];
for (let i = 0; i < arr.length; i++) r = r.concat(arr[i]);
return r;
}