MCPcopy
hub / github.com/gvergnaud/ts-pattern / finite

Function finite

src/patterns.ts:1023–1024  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1021 * .with(P.number.finite, () => 'not Infinity')
1022 */
1023const finite = <input>(): GuardExcludeP<input, number, never> =>
1024 when((value) => isNumber(value) && Number.isFinite(value));
1025
1026/**
1027 * `P.number.positive()` matches **positive** numbers.

Callers 1

numberChainableFunction · 0.85

Calls 2

whenFunction · 0.85
isNumberFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…