1.1.1
π Get a random item from an array
Repository
Current version released
3 years ago
random_item
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. ESM βΆ SkyPack / script tag βΆ JSDelivr.
The API is the same on all this platforms.
Documentation
Autogenerated Documentation π
This package is strongly typed πͺ
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.