Skip to main content

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.