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

Function invariant

packages/ecma262-abstract/ToNumber.ts:6–14  ·  view source on GitHub ↗
(
  condition: boolean,
  message: string,
  Err: typeof Error = Error
)

Source from the content-addressed store, hash-verified

4const ZERO = new Decimal(0)
5
6function invariant(
7 condition: boolean,
8 message: string,
9 Err: typeof Error = Error
10): asserts condition {
11 if (!condition) {
12 throw new Err(message)
13 }
14}
15
16/**
17 * https://tc39.es/ecma262/#sec-tonumber

Callers 1

ToNumberFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected