random_item

codecov deno doc

Get a random item from an array

Usage

Deno 🚀

import {
  randomItem,
  randomMultipleItems,
} from "https://deno.land/x/random_item/mod.ts";

randomItem(["🐴", "🦄", "🌈"]);
//=> '🦄'

randomMultipleItems(["🐴", "🦄", "🌈"], 2);
//=> ['🌈', '🦄']

Node.js 🐢

import { randomTimeZone, timeZone } from "@ultirequiem/random-item";

Browser

You can use any CDN 🔥

Eg. ESMSkyPack / script tagJSDelivr.

The API is the same on all this platforms.

Documentation

Autogenerated Documentation 😎

This package is strongly typed 💪

image

Support

Open an Issue, I will check it a soon as possible 👀

If you want to hurry me up a bit send me a tweet 😆

Consider supporting me on Patreon if you like my work 🚀

Don't forget to start the repo ⭐

Licence

Licensed under the MIT License.