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

Function positive

src/patterns.ts:1035–1036  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1033 * .with(P.number.positive(), () => 'number > 0')
1034 */
1035const positive = <input>(): GuardExcludeP<input, number, never> =>
1036 when((value) => isNumber(value) && value > 0);
1037
1038/**
1039 * `P.number.negative()` matches **negative** 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…