MCPcopy
hub / github.com/formatjs/formatjs / invariant

Function invariant

packages/intl-localematcher/abstract/utils.ts:22–30  ·  view source on GitHub ↗
(
  condition: boolean,
  message: string,
  Err: any = Error
)

Source from the content-addressed store, hash-verified

20 * ```
21 */
22export function invariant(
23 condition: boolean,
24 message: string,
25 Err: any = Error
26): asserts condition {
27 if (!condition) {
28 throw new Err(message)
29 }
30}
31
32// This is effectively 2 languages in 2 different regions in the same cluster
33const DEFAULT_MATCHING_THRESHOLD = 838

Callers 15

CanonicalizeUValueFunction · 0.70
ResolveLocaleFunction · 0.70
core.tsFile · 0.50
core.tsFile · 0.50
extractNumbersFunction · 0.50
loadUnitsFunction · 0.50
resolvedOptionsMethod · 0.50
constructorMethod · 0.50
deconstructPatternFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected