Skip to main content

Built and signed on GitHub Actions

deno module, a collection of array util under dallmo-util

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
4 weeks ago (1.3.0)
function random_index
random_index(input_array: any[]): number

get a random index of an array

Parameters

input_array: any[]
  • the input array

Return Type

a random index of the input array

Add Package

deno add jsr:@dallmo/util-array

Import symbol

import { random_index } from "@dallmo/util-array";

---- OR ----

Import directly with a jsr specifier

import { random_index } from "jsr:@dallmo/util-array";

Add Package

npx jsr add @dallmo/util-array

Import symbol

import { random_index } from "@dallmo/util-array";

Add Package

yarn dlx jsr add @dallmo/util-array

Import symbol

import { random_index } from "@dallmo/util-array";

Add Package

pnpm dlx jsr add @dallmo/util-array

Import symbol

import { random_index } from "@dallmo/util-array";

Add Package

bunx jsr add @dallmo/util-array

Import symbol

import { random_index } from "@dallmo/util-array";