1.0.1 ā€¢ Published 3 years ago

ts-randomize v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ts-randomize

šŸ§¬ A package to generate a random element from a given array (Warning: Incredibly Complex)

Installation

yarn add ts-randomize
# or
npm i ts-randomize

Usage

import { random } from "ts-randomize";

const data = ["This is an element", "Another element", ...etc];
const myVar = random(data);

console.log(myVar); // will output a random value from the `data` array

Contributing

Issues, PRs, and contributions are always welcome! Thanks to all who do šŸ’™

Created and maintained with ā¤ļø by @FilippoFonseca.