UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

24 lines (22 loc) 372 B
import { dfdlT } from "@monstermann/dfdl"; //#region src/number/exp.ts /** * `exp(target, source)` * * Raises `target` to the power of `source` and returns the result. * * ```ts * exp(2, 3); // 8 * exp(5, 2); // 25 * ``` * * ```ts * pipe(2, exp(3)); // 8 * pipe(5, exp(2)); // 25 * ``` */ const exp = dfdlT((a, b) => { return a ** b; }, 2); //#endregion export { exp };