Skip to main content

Built and signed on GitHub Actions

A collection of utility functions

This package works with Bun, Cloudflare Workers, Node.js, Deno, Browsers
JSR Score
88%
Published
4 months ago (0.2.2)
function number.factorial

Examples

Example 1

factorial(5); // 120
factorial(0); // 1

Parameters

Return Type

the factorial of the given number

Add Package

deno add @modules/utils

Import symbol

import { number } from "@modules/utils";
const { factorial } = number;

Add Package

npx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";
const { factorial } = number;

Add Package

yarn dlx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";
const { factorial } = number;

Add Package

pnpm dlx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";
const { factorial } = number;

Add Package

bunx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";
const { factorial } = number;