MCPcopy Create free account
hub / github.com/angular/angular / createNewSegmentChildren

Function createNewSegmentChildren

packages/router/src/create_url_tree.ts:548–561  ·  view source on GitHub ↗
(outlets: {[name: string]: readonly unknown[] | string})

Source from the content-addressed store, hash-verified

546}
547
548function createNewSegmentChildren(outlets: {[name: string]: readonly unknown[] | string}): {
549 [outlet: string]: UrlSegmentGroup;
550} {
551 const children: {[outlet: string]: UrlSegmentGroup} = {};
552 Object.entries(outlets).forEach(([outlet, commands]) => {
553 if (typeof commands === 'string') {
554 commands = [commands];
555 }
556 if (commands !== null) {
557 children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);
558 }
559 });
560 return children;
561}
562
563function stringify(params: {[key: string]: any}): {[key: string]: string} {
564 const res: {[key: string]: string} = {};

Callers 1

createNewSegmentGroupFunction · 0.85

Calls 3

createNewSegmentGroupFunction · 0.85
forEachMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected