# tumbojs

> A javascript package for randomly selecting items from an array efficiently.

Latest version **1.3.0** (published 2019-05-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install tumbojs
pnpm add tumbojs
yarn add tumbojs
bun add tumbojs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2019-05-17 |
| First published | 2018-12-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1015.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | George Benjamin |
| Maintainers | georgeben |
| Keywords | tumbo, random, array |

## Links

- npm: https://www.npmjs.com/package/tumbojs
- Repository: https://github.com/georgeben/tumbo.js
- Homepage: https://github.com/georgeben/tumbo.js#readme
- Issues: https://github.com/georgeben/tumbo.js/issues
- npm.io page: https://npm.io/package/tumbojs

## Recent versions

- 1.3.0 (latest) — 2019-05-17
- 1.2.0 — 2019-05-17
- 1.0.1 — 2018-12-16
- 1.0.0 — 2018-12-16

## README

# tumbo.js
Randomly select elements from an array efficiently.

[![Build Status](https://travis-ci.com/georgeben/tumbo.js.svg?branch=master)](https://travis-ci.com/georgeben/tumbo.js)
[![Coverage Status](https://coveralls.io/repos/github/georgeben/tumbo.js/badge.svg?branch=feature-badges)](https://coveralls.io/github/georgeben/tumbo.js?branch=feature-badges)


Tumbo.js is an npm package to randomly select a desired number of elements from an array.

## Getting started.
Install this package from npm by running the command `npm install tumbojs`

## API
```js
var tumbo = require('tumbojs')
```

### tumbo.pick(array, n)
The pick method takes in an array and a number specifying the number of elements that should be selected randomly to form the new array.

```js
//EXAMPLE
const tumbo = require('tumbojs');
const myarr = ["Hello", "Hi", "Hey"];
const newarr = tumbo.pick(myarr, 2);

```

## Tests
Run `npm test` to run tests

### Author
George Benjamin

### License
[ISC](https://opensource.org/licenses/ISC)

---
_Source: https://npm.io/package/tumbojs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
