MCPcopy Index your code
hub / github.com/formatjs/formatjs / format

Function format

packages/cli-lib/formatters/simple.ts:8–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6export type PhraseJson = Record<string, string>
7
8export const format: FormatFn<PhraseJson> = msgs => {
9 return Object.keys(msgs).reduce((all: PhraseJson, k) => {
10 all[k] = msgs[k].defaultMessage!
11 return all
12 }, {})
13}
14
15export const compile: CompileFn<PhraseJson> = msgs => msgs

Callers 3

debugFunction · 0.50
debugFunction · 0.50
warnFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected