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

Function loadAsMap

packages/compiler/test/i18n/serializers/xtb_spec.ts:18–25  ·  view source on GitHub ↗
(xtb: string)

Source from the content-addressed store, hash-verified

16 const serializer = new Xtb();
17
18 function loadAsMap(xtb: string): {[id: string]: string} {
19 const {i18nNodesByMsgId} = serializer.load(xtb, 'url');
20 const msgMap: {[id: string]: string} = {};
21 Object.keys(i18nNodesByMsgId).forEach((id) => {
22 msgMap[id] = serializeNodes(i18nNodesByMsgId[id]).join('');
23 });
24 return msgMap;
25 }
26
27 describe('load', () => {
28 it('should load XTB files with a doctype', () => {

Callers 1

xtb_spec.tsFile · 0.70

Calls 5

serializeNodesFunction · 0.90
loadMethod · 0.65
keysMethod · 0.65
joinMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…