MCPcopy Index your code
hub / github.com/angular/angular / splitNsName

Function splitNsName

packages/core/src/render3/i18n/i18n_parse.ts:987–1003  ·  view source on GitHub ↗
(elementName: string, fatal: boolean = true)

Source from the content-addressed store, hash-verified

985}
986
987function splitNsName(elementName: string, fatal: boolean = true): [string | null, string] {
988 if (elementName[0] != ':') {
989 return [null, elementName];
990 }
991
992 const colonIndex = elementName.indexOf(':', 1);
993
994 if (colonIndex === -1) {
995 if (fatal) {
996 throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
997 } else {
998 return [null, elementName];
999 }
1000 }
1001
1002 return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
1003}
1004
1005function i18nResolveSanitizer(attrName: string, tagName?: string): SanitizerFn | null {
1006 let schemaContext: SecurityContext;

Callers 1

i18nResolveSanitizerFunction · 0.70

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…