An open API service indexing awesome lists of open source software.

https://github.com/melanieseltzer/pikkr

Pick something random from a list of items.
https://github.com/melanieseltzer/pikkr

chooser javascript pick random rng typescript

Last synced: 6 months ago
JSON representation

Pick something random from a list of items.

Awesome Lists containing this project

README

          

# pikkr ![](https://img.shields.io/circleci/project/github/melanieseltzer/pikkr.svg?style=flat)

> Don't what to choose? pikkr returns a random element from an array, so you don't have to.

## Install

```
$ npm install pikkr
```

## Usage

```js
import pikkr from 'pikkr';

// feed it an array of anything
const result = pikkr(['hi', 2, { name: 'Fred' }]);

console.log(result);
//=> randomly chosen element from the array is returned
```

## License

ISC © [Melanie Seltzer](https://github.com/melanieseltzer)