MCPcopy Index your code
hub / github.com/messageformat/messageformat / concatenate

Method concatenate

packages/messageformat/src/compiler.js:91–96  ·  view source on GitHub ↗
(tokens, root)

Source from the content-addressed store, hash-verified

89 }
90
91 concatenate(tokens, root) {
92 const asValues = this.options.returnType === 'values';
93 return asValues && (root || tokens.length > 1)
94 ? '[' + tokens.join(', ') + ']'
95 : tokens.join(' + ') || '""';
96 }
97
98 token(token, pluralToken) {
99 if (typeof token == 'string') return JSON.stringify(token);

Callers 2

compileMethod · 0.95
casesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected