( opts: Record<string, Intl.DateTimeFormatOptions>, timeZone: string )
| 23 | import {invariant} from '#packages/intl/utils.js' |
| 24 | |
| 25 | function setTimeZoneInOptions( |
| 26 | opts: Record<string, Intl.DateTimeFormatOptions>, |
| 27 | timeZone: string |
| 28 | ): Record<string, Intl.DateTimeFormatOptions> { |
| 29 | return Object.keys(opts).reduce( |
| 30 | (all: Record<string, Intl.DateTimeFormatOptions>, k) => { |
| 31 | all[k] = { |
| 32 | timeZone, |
| 33 | ...opts[k], |
| 34 | } |
| 35 | return all |
| 36 | }, |
| 37 | {} |
| 38 | ) |
| 39 | } |
| 40 | |
| 41 | function deepMergeOptions( |
| 42 | opts1: Record<string, Intl.DateTimeFormatOptions>, |
no outgoing calls
no test coverage detected