MCPcopy Index your code
hub / github.com/angular/angular-cli / branchAndMerge

Function branchAndMerge

packages/angular_devkit/schematics/src/rules/base.ts:89–96  ·  view source on GitHub ↗
(rule: Rule, strategy: MergeStrategy = MergeStrategy.Default)

Source from the content-addressed store, hash-verified

87}
88
89export function branchAndMerge(rule: Rule, strategy: MergeStrategy = MergeStrategy.Default): Rule {
90 return (tree, context) => {
91 return callRule(rule, tree.branch(), context).pipe(
92 map((branch) => tree.merge(branch, strategy || context.strategy)),
93 mapTo(tree),
94 );
95 };
96}
97
98export function when(predicate: FilePredicate<boolean>, operator: FileOperator): FileOperator {
99 return (entry: FileEntry) => {

Callers

nothing calls this directly

Calls 3

callRuleFunction · 0.90
branchMethod · 0.65
mergeMethod · 0.65

Tested by

no test coverage detected