feat(facade): add ListWrapper.flatten

This commit is contained in:
vsavkin
2016-03-24 20:36:19 +00:00
committed by Victor Savkin
parent 91999e016e
commit a1880c3576
2 changed files with 13 additions and 0 deletions
@@ -278,6 +278,11 @@ export class ListWrapper {
}
static isImmutable(list: any[]): boolean { return Object.isSealed(list); }
static flatten<T>(array: T[][]): T[] {
let res = [];
array.forEach((a) => res = res.concat(a));
return res;
}
}
export function isListLikeIterable(obj: any): boolean {