refactor(collection.ts): simplify ListWrapper.clear implementation

This commit is contained in:
Igor Minar 2015-09-01 20:14:54 -07:00
parent 53d0861372
commit 44c303aad2
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ export class ListWrapper {
}
return false;
}
static clear(list: any[]) { list.splice(0, list.length); }
static clear(list: any[]) { list.length = 0; }
static join(list: any[], s: string): string { return list.join(s); }
static isEmpty(list: any[]): boolean { return list.length == 0; }
static fill(list: any[], value: any, start: number = 0, end: number = null) {