Skip to main content
Module

x/fuzzy_octo_guacamole/mod.ts>P.between

A playground for testing CI setup that deploys on Deno and NPM
Latest
variable P.between
import { P } from "https://deno.land/x/fuzzy_octo_guacamole@v5.0.1/mod.ts";
const { between } = P;

P.number.between(min, max) matches number between min and max, equal to min or equal to max.

Read the documentation for P.number.between on GitHub

Examples

match(value) .with(P.number.between(0, 10), () => '0 <= numbers <= 10')

type

<input, min extends number, max extends number>(min: min, max: max) => GuardExcludeP<input, number, never>