# lucky-winner

> A JS module for picking K random names from an array of N names.

Latest version **1.0.1** (published 2021-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install lucky-winner
pnpm add lucky-winner
yarn add lucky-winner
bun add lucky-winner
```

## 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.0.1 |
| Published | 2021-11-16 |
| First published | 2021-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Pavan R |
| Maintainers | pavanchikkanna |
| Keywords | lucky winner, js |

## Links

- npm: https://www.npmjs.com/package/lucky-winner
- Repository: https://github.com/pavanchikkanna/lucky-winner
- Homepage: https://github.com/pavanchikkanna/lucky-winner#README.md
- Issues: https://github.com/pavanchikkanna/lucky-winner/issues
- npm.io page: https://npm.io/package/lucky-winner

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-11-16
- 1.0.0 — 2021-11-16

## README

��# lucky-winner
A JS module for picking K random names from an array of N names.

where 1<=K<=N

# Install
```javascript
npm i lucky-winner
```

# Usage
```javascript
const luckyWinner = require('lucky-winner');
// luckyWinner(names,K=1) names:array and K:integer
console.log(luckyWinner(['pavan','chikkanna','gowda'])) // returns one random name.
console.log(luckyWinner(['pavan','chikkanna','gowda'],2)) // returns two random names
console.log(luckyWinner(['pavan','chikkanna','gowda'],3)) // returns three random names
console.log(luckyWinner(1)) // throws error
```

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