Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
gnomejs/sdkA module for generating random values.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
a year ago (0.1.0)
A module for generating random values.
randomUUID()- creates a random universal unique identifier.getRandomValues()- creates random values for the given array.randomBytes()- creates a Uint8Array with random values (bytes) for the given length using a cryptographically secure random number generator (CSRNG).randomFileName()- creates a random file name with the given length using CSRNG.
Basic Usage
import { randomBytes, randomFileName } from "@gnome/assert"; // returns a Uint8Array filled with random bytes console.log(randomBytes(32)) // return a file name that starts with tmp_ followed by // 15 random characters. console.log(randomFileName(15, 'tmp_'))
Built and signed on
GitHub Actions
Add Package
deno add jsr:@gnome/random
Import symbol
import * as random from "@gnome/random";
Import directly with a jsr specifier
import * as random from "jsr:@gnome/random";
Add Package
pnpm i jsr:@gnome/random
pnpm dlx jsr add @gnome/random
Import symbol
import * as random from "@gnome/random";
Add Package
yarn add jsr:@gnome/random
yarn dlx jsr add @gnome/random
Import symbol
import * as random from "@gnome/random";
Add Package
vlt install jsr:@gnome/random
Import symbol
import * as random from "@gnome/random";
Add Package
npx jsr add @gnome/random
Import symbol
import * as random from "@gnome/random";
Add Package
bunx jsr add @gnome/random
Import symbol
import * as random from "@gnome/random";