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

Function createNewSegmentChildren

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

Source from the content-addressed store, hash-verified

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