UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

24 lines (22 loc) 365 B
import { dfdlT } from "@monstermann/dfdl"; //#region src/number/sub.ts /** * `sub(target, source)` * * Subtracts `source` from `target` and returns the result. * * ```ts * sub(10, 3); // 7 * sub(5, 8); // -3 * ``` * * ```ts * pipe(10, sub(3)); // 7 * pipe(5, sub(8)); // -3 * ``` */ const sub = dfdlT((a, b) => { return a - b; }, 2); //#endregion export { sub };