Function
mergeConfig
(c1: Record<string, object>, c2?: Record<string, object>)
Source from the content-addressed store, hash-verified
| 24 | // -- MessageFormat -------------------------------------------------------- |
| 25 | |
| 26 | function mergeConfig(c1: Record<string, object>, c2?: Record<string, object>) { |
| 27 | if (!c2) { |
| 28 | return c1 |
| 29 | } |
| 30 | return { |
| 31 | ...c1, |
| 32 | ...c2, |
| 33 | ...Object.keys(c1).reduce((all: Record<string, object>, k) => { |
| 34 | all[k] = { |
| 35 | ...c1[k], |
| 36 | ...c2[k], |
| 37 | } |
| 38 | return all |
| 39 | }, {}), |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | function mergeConfigs( |
| 44 | defaultConfig: Formats, |
Tested by
no test coverage detected