* Retrieves the first value that is defined in an array, going backwards from an index position. * * To avoid repeating the same data (as when the "format" and "standalone" forms are the same) * add the first value to the locale data arrays, and add other values only if they are different. * *
(data: T[], index: number)
| 715 | * |
| 716 | */ |
| 717 | function getLastDefinedValue<T>(data: T[], index: number): T { |
| 718 | for (let i = index; i > -1; i--) { |
| 719 | if (typeof data[i] !== 'undefined') { |
| 720 | return data[i]; |
| 721 | } |
| 722 | } |
| 723 | throw new RuntimeError( |
| 724 | RuntimeErrorCode.LOCALE_DATA_UNDEFINED, |
| 725 | ngDevMode && 'Locale data API: locale data undefined', |
| 726 | ); |
| 727 | } |
| 728 | |
| 729 | /** |
| 730 | * Represents a time value with hours and minutes. |
no outgoing calls
no test coverage detected
searching dependent graphs…