MCPcopy
hub / github.com/formatjs/formatjs / printSelectElement

Function printSelectElement

packages/icu-messageformat-parser/printer.ts:201–211  ·  view source on GitHub ↗
(el: SelectElement)

Source from the content-addressed store, hash-verified

199}
200
201function printSelectElement(el: SelectElement) {
202 const keys = Object.keys(el.options).sort(compareCodePoints)
203 const msg = [
204 el.value,
205 'select',
206 keys
207 .map(id => `${id}{${doPrintAST(el.options[id].value, false)}}`)
208 .join(' '),
209 ].join(',')
210 return `{${msg}}`
211}
212
213const PLURAL_RULE_ORDER: Record<string, number> = {
214 zero: 0,

Callers 1

doPrintASTFunction · 0.85

Calls 1

doPrintASTFunction · 0.85

Tested by

no test coverage detected