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_insert
random_insert(
input_array: any[],
new_item: any,
): any[]

insert an item into an array with random position

Parameters

input_array: any[]
  • the input array
new_item: any
  • the item to be inserted into the input array

Return Type

any[]

a new array with the new item inserted

Add Package

deno add jsr:@dallmo/util-array

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @dallmo/util-array

Import symbol

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

Add Package

yarn dlx jsr add @dallmo/util-array

Import symbol

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

Add Package

pnpm dlx jsr add @dallmo/util-array

Import symbol

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

Add Package

bunx jsr add @dallmo/util-array

Import symbol

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