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

Method getFallback

packages/runtime/src/messages.mjs:194–202  ·  view source on GitHub ↗

* Get the list of fallback locales * @param {string} [lc] If empty or undefined, defaults to `this.locale` * @returns {string[]}

(lc)

Source from the content-addressed store, hash-verified

192 * @returns {string[]}
193 */
194 getFallback(lc) {
195 if (!lc) lc = this.locale;
196 return (
197 this._fallback[lc] ||
198 (lc === this.defaultLocale || !this.defaultLocale
199 ? []
200 : [this.defaultLocale])
201 );
202 }
203
204 /**
205 * Set the fallback locale or locales for `lc`

Callers 4

hasMessageMethod · 0.95
hasObjectMethod · 0.95
getMethod · 0.95
messages.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected