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

Function printArgumentStyle

packages/icu-messageformat-parser/printer.ts:168–176  ·  view source on GitHub ↗
(style: string | Skeleton)

Source from the content-addressed store, hash-verified

166}
167
168function printArgumentStyle(style: string | Skeleton) {
169 if (typeof style === 'string') {
170 return printEscapedMessage(style)
171 } else if (style.type === SKELETON_TYPE.dateTime) {
172 return `::${printDateTimeSkeleton(style)}`
173 } else {
174 return `::${style.tokens.map(printNumberSkeletonToken).join(' ')}`
175 }
176}
177
178export function printDateTimeSkeleton(style: DateTimeSkeleton): string {
179 return style.pattern

Callers 1

printSimpleFormatElementFunction · 0.85

Calls 2

printEscapedMessageFunction · 0.85
printDateTimeSkeletonFunction · 0.85

Tested by

no test coverage detected