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

Function parseMappingArray

packages/compiler/test/typecheck/util.ts:544–551  ·  view source on GitHub ↗

Parses `['field', 'field: alias']` style mappings into a `{field: alias}` record.

(values: string[])

Source from the content-addressed store, hash-verified

542
543/** Parses `['field', 'field: alias']` style mappings into a `{field: alias}` record. */
544function parseMappingArray(values: string[]): {[field: string]: string} {
545 const result: {[field: string]: string} = {};
546 for (const value of values) {
547 const [field, alias] = value.split(':', 2).map((part) => part.trim());
548 result[field] = alias || field;
549 }
550 return result;
551}
552
553class NoopSchemaChecker implements DomSchemaChecker<unknown> {
554 get diagnostics(): ReadonlyArray<unknown> {

Callers 1

resolveHostDirectivesFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected