Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

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.