Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

getInitializableAll

import { getInitializableAll } from "https://raw.githubusercontent.com/baetheus/fun/main/predicate.ts";

Get a Initializable<Predicate> for any type A that combines using the Predicate and function.

@example
import { getInitializableAll } from "./predicate.ts";
import { pipe } from "./fn.ts";

const { combine } = getInitializableAll<number>();

const greaterThanZero = (n: number) => n > 0;
const lessThanFifty = (n: number) => n < 50;

const betweenZeroAndFifty = pipe(
  greaterThanZero,
  combine(lessThanFifty)
);

const result1 = betweenZeroAndFifty(10); // true
const result2 = betweenZeroAndFifty(-10); // false
const result3 = betweenZeroAndFifty(100); // false
function getInitializableAll<A = never>(): Initializable<Predicate<A>>;
§
getInitializableAll<A = never>(): Initializable<Predicate<A>>
[src]

§Type Parameters

§
A = never
[src]