A pseudo-random number generator implementing the same contract as
Math.random
, i.e. taking zero arguments and returning a random number in
the range [0, 1)
. The behavior of a function that accepts a Prng
an
option may be customized by passing a Prng
with different behavior from
Math.random
, for example it may be seeded.
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
denoland/stdUNSTABLE: Various utilities using random number generators. The package also provides seeded pseudo-random number generator.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
JSR Score
100%
Published
3 months ago (0.1.0)
Add Package
deno add jsr:@std/random
Import symbol
import { type Prng } from "@std/random/between";
---- OR ----
Import directly with a jsr specifier
import { type Prng } from "jsr:@std/random/between";
Add Package
npx jsr add @std/random
Import symbol
import { type Prng } from "@std/random/between";
Add Package
yarn dlx jsr add @std/random
Import symbol
import { type Prng } from "@std/random/between";
Add Package
pnpm dlx jsr add @std/random
Import symbol
import { type Prng } from "@std/random/between";
Add Package
bunx jsr add @std/random
Import symbol
import { type Prng } from "@std/random/between";