UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

17 lines 600 B
//#region src/fp/math/multiply.d.ts /** * Creates a function that multiplies its input by `multiplicand`. Use it with * {@link pipe}, or as the callback of a function such as {@link map}. * * @param multiplicand - The number to multiply the input by. * @returns A function that maps a `number` to `value * multiplicand`. * * @example * import { pipe, map, multiply } from 'es-toolkit/fp'; * * pipe(3, multiply(2)); // => 6 * pipe([1, 2, 3], map(multiply(3))); // => [3, 6, 9] */ declare function multiply(multiplicand: number): (value: number) => number; //#endregion export { multiply };