(...configs)
| 106629 | } |
| 106630 | const isLegalKey = (key1)=>key1 !== "__proto__"; |
| 106631 | function mergeConfig(...configs) { |
| 106632 | return configs.reduce((out, source)=>{ |
| 106633 | for(const key2 in source)if (key2 === "signals") // for signals, we merge the signals arrays |
| 106634 | // source signals take precedence over |
| 106635 | // existing signals with the same name |
| 106636 | out.signals = mergeNamed(out.signals, source.signals); |
| 106637 | else { |
| 106638 | // otherwise, merge objects subject to recursion constraints |
| 106639 | // for legend block, recurse for the layout entry only |
| 106640 | // for style block, recurse for all properties |
| 106641 | // otherwise, no recursion: objects overwrite, no merging |
| 106642 | const r = key2 === "legend" ? { |
| 106643 | layout: 1 |
| 106644 | } : key2 === "style" ? true : null; |
| 106645 | writeConfig(out, key2, source[key2], r); |
| 106646 | } |
| 106647 | return out; |
| 106648 | }, {}); |
| 106649 | } |
| 106650 | function writeConfig(output, key3, value, recurse) { |
| 106651 | if (!isLegalKey(key3)) return; |
| 106652 | let k, o; |
nothing calls this directly
no test coverage detected