Code coverage report for core/src/util/collections.ts

Statements: 100% (5 / 5)      Branches: 50% (1 / 2)      Functions: 100% (3 / 3)      Lines: 100% (4 / 4)      Ignored: none     

All files » core/src/util/ » collections.ts
1 2 3 4 5 6 7 81 6     1 3    
export function first<T>(val: T | undefined, ...args: T[]): T | undefined {
  return args.find(item => item);
}
 
export function or<T>(val: T | undefined, fallback: T): T {
  return val || fallback;
}