Skip to main content
Home

Built and signed on GitHub Actions

A collection of utility functions

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
88%
Published
a year ago (0.2.2)
function number.average
average(...numbers: number[]): number

Examples

Example 1

average(2, 3, 4); // 3
average(2, 3, 4, 1); // 2.5

Parameters

...numbers: number[]

Return Type

the average of the given numbers

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@modules/utils

Import symbol

import { number } from "@modules/utils";
or

Import directly with a jsr specifier

import { number } from "jsr:@modules/utils";

Add Package

pnpm i jsr:@modules/utils
or (using pnpm 10.8 or older)
pnpm dlx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";

Add Package

yarn add jsr:@modules/utils
or (using Yarn 4.8 or older)
yarn dlx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";

Add Package

vlt install jsr:@modules/utils

Import symbol

import { number } from "@modules/utils";

Add Package

npx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";

Add Package

bunx jsr add @modules/utils

Import symbol

import { number } from "@modules/utils";