(source: Source, strategy: MergeStrategy = MergeStrategy.Default)
| 60 | * Merge an input tree with the source passed in. |
| 61 | */ |
| 62 | export function mergeWith(source: Source, strategy: MergeStrategy = MergeStrategy.Default): Rule { |
| 63 | return (tree, context) => { |
| 64 | return callSource(source, context).pipe( |
| 65 | map((sourceTree) => tree.merge(sourceTree, strategy || context.strategy)), |
| 66 | mapTo(tree), |
| 67 | ); |
| 68 | }; |
| 69 | } |
| 70 | |
| 71 | export function noop(): Rule { |
| 72 | return () => {}; |
no test coverage detected