feat(router): implement redirectTo

This commit is contained in:
vsavkin
2016-06-08 16:14:26 -07:00
parent 25c6a3715d
commit 66caabca0c
8 changed files with 315 additions and 46 deletions

View File

@ -28,6 +28,10 @@ export function first<T>(a: T[]): T|null {
return a.length > 0 ? a[0] : null;
}
export function last<T>(a: T[]): T|null {
return a.length > 0 ? a[a.length - 1] : null;
}
export function and(bools: boolean[]): boolean {
return bools.reduce((a, b) => a && b, true);
}