Use flatten array helper

This commit is contained in:
Matt Bierner
2019-04-02 17:16:10 -07:00
parent e50c2572d4
commit 0ec326531e
4 changed files with 12 additions and 4 deletions

View File

@@ -16,3 +16,7 @@ export function equals<T>(one: ReadonlyArray<T>, other: ReadonlyArray<T>, itemEq
return true;
}
export function flatten<T>(arr: ReadonlyArray<T>[]): T[] {
return ([] as T[]).concat.apply([], arr);
}