feat(view): implemented loading component next to existing location

This commit is contained in:
vsavkin
2015-04-18 11:18:03 -07:00
parent 77b31ab42f
commit 681d06386d
8 changed files with 222 additions and 204 deletions
@@ -129,6 +129,9 @@ export class ListWrapper {
static filter(array, pred:Function) {
return array.filter(pred);
}
static indexOf(array, value, startIndex = -1) {
return array.indexOf(value, startIndex);
}
static any(list:List, pred:Function) {
for (var i = 0 ; i < list.length; ++i) {
if (pred(list[i])) return true;
@@ -114,6 +114,9 @@ export class ListWrapper {
}
return null;
}
static indexOf(array: List<any>, value, startIndex = -1) {
return array.indexOf(value, startIndex);
}
static reduce<T>(list: List<T>,
fn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T,
init: T) {