agomusa / random_item

🎁 Get a random item from an array

Home Page:https://deno.land/x/random_item

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

random_item

Get a random item from an array

Usage

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

randomItem(["🐴", "πŸ¦„", "🌈"]);
//=> 'πŸ¦„'

randomMultipleItems(["🐴", "πŸ¦„", "🌈"], 2);
//=> ['🌈', 'πŸ¦„']

License

This project is licensed under the MIT License.

About

🎁 Get a random item from an array

https://deno.land/x/random_item

License:MIT License


Languages

Language:TypeScript 100.0%