Creates an array and fills it with values.
(length: number, valueFunction: (index: number) => T)
| 32 | |
| 33 | /** Creates an array and fills it with values. */ |
| 34 | function range<T>(length: number, valueFunction: (index: number) => T): T[] { |
| 35 | const valuesArray = Array(length); |
| 36 | for (let i = 0; i < length; i++) { |
| 37 | valuesArray[i] = valueFunction(i); |
| 38 | } |
| 39 | return valuesArray; |
| 40 | } |
| 41 | |
| 42 | /** Adapts the native JS Date for use with cdk-based components that work with dates. */ |
| 43 | @Service({autoProvided: false}) |
no outgoing calls
no test coverage detected