(d: Units['long']['volume-gallon'])
| 19 | export type Units = (typeof UnitsData)['main']['en']['units'] |
| 20 | |
| 21 | function extractUnitPattern(d: Units['long']['volume-gallon']) { |
| 22 | return collapseSingleValuePluralRule( |
| 23 | PLURAL_RULES.reduce((all: LDMLPluralRuleMap<string>, ldml) => { |
| 24 | if (d[`unitPattern-count-${ldml}` as 'unitPattern-count-one']) { |
| 25 | all[ldml] = d[`unitPattern-count-${ldml}` as 'unitPattern-count-one'] |
| 26 | } |
| 27 | return all |
| 28 | }, {} as any) |
| 29 | ) |
| 30 | } |
| 31 | |
| 32 | async function loadUnits(locale: string): Promise<UnitDataTable> { |
| 33 | const units = ( |
no test coverage detected