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

Function loadAsMap

packages/compiler/test/i18n/serializers/xliff_spec.ts:267–276  ·  view source on GitHub ↗
(xliff: string)

Source from the content-addressed store, hash-verified

265 }
266
267 function loadAsMap(xliff: string): {[id: string]: string} {
268 const {i18nNodesByMsgId} = serializer.load(xliff, 'url');
269
270 const msgMap: {[id: string]: string} = {};
271 Object.keys(i18nNodesByMsgId).forEach(
272 (id) => (msgMap[id] = serializeNodes(i18nNodesByMsgId[id]).join('')),
273 );
274
275 return msgMap;
276 }
277
278 describe('write', () => {
279 it('should write a valid xliff file', () => {

Callers 1

xliff_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…