MCPcopy
hub / github.com/angular/angular / loadAsMap

Function loadAsMap

packages/compiler/test/i18n/serializers/xliff2_spec.ts:289–298  ·  view source on GitHub ↗
(xliff: string)

Source from the content-addressed store, hash-verified

287 }
288
289 function loadAsMap(xliff: string): {[id: string]: string} {
290 const {i18nNodesByMsgId} = serializer.load(xliff, 'url');
291
292 const msgMap: {[id: string]: string} = {};
293 Object.keys(i18nNodesByMsgId).forEach(
294 (id) => (msgMap[id] = serializeNodes(i18nNodesByMsgId[id]).join('')),
295 );
296
297 return msgMap;
298 }
299
300 describe('write', () => {
301 it('should write a valid xliff 2.0 file', () => {

Callers 1

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