MCPcopy Create free account
hub / github.com/formatjs/formatjs / messagesContainString

Function messagesContainString

packages/intl/create-intl.ts:32–38  ·  view source on GitHub ↗
(
  messages: Record<string, string> | Record<string, MessageFormatElement[]>
)

Source from the content-addressed store, hash-verified

30}
31
32function messagesContainString(
33 messages: Record<string, string> | Record<string, MessageFormatElement[]>
34): messages is Record<string, MessageFormatElement[]> {
35 const firstMessage = messages ? messages[Object.keys(messages)[0]] : undefined
36
37 return typeof firstMessage === 'string'
38}
39
40function verifyConfigMessages<T = string>(config: IntlConfig<T>) {
41 if (

Callers 1

verifyConfigMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected