random_item

CI codecov deno doc

Custom badge Custom badge Custom badge

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

Using type module 🍱

Using a plain script tag 👇

You have the same API on all of this platforms.

Documentation

Autogenerated Documentation 😎

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.