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

Function generateENXB

packages/cli-lib/pseudo_locale.ts:156–168  ·  view source on GitHub ↗
(
  msg: string | MessageFormatElement[]
)

Source from the content-addressed store, hash-verified

154 */
155/** @internal */
156export function generateENXB(
157 msg: string | MessageFormatElement[]
158): MessageFormatElement[] {
159 const ast = typeof msg === 'string' ? parse(msg) : msg
160 forEachLiteralElement(ast, el => {
161 el.value = transformString(FLIPPED_MAP, false, el.value)
162 })
163 return [
164 {type: TYPE.literal, value: '\u202e'},
165 ...ast,
166 {type: TYPE.literal, value: '\u202c'},
167 ]
168}

Callers

nothing calls this directly

Calls 3

parseFunction · 0.90
forEachLiteralElementFunction · 0.85
transformStringFunction · 0.85

Tested by

no test coverage detected