# benford

> generates random numbers that follow the Benford distribution

Latest version **0.0.2** (published 2017-09-01) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-09-01 |
| First published | 2017-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Tasto |
| Maintainers | johntasto |

## Links

- npm: https://www.npmjs.com/package/benford
- Repository: https://github.com/JohnTasto/benford
- Homepage: https://github.com/JohnTasto/benford#readme
- Issues: https://github.com/JohnTasto/benford/issues
- npm.io page: https://npm.io/package/benford

## Recent versions

- 0.0.2 (latest) — 2017-09-01
- 0.0.1 — 2017-09-01

## README

# Benford

Generates random numbers that follow the Benford distribution.

```js
const uniform = (min, max) => Math.random() * (max - min) + min
const benford = (min, max) => Math.exp(uniform(Math.log(min), Math.log(max)))
```

That's it. Either `npm i -S benford` if you like dependencies, or just copy and paste the above code.

## Todo

- [ ] Consider using `window.crypto.getRandomValues()` or `crypto.randomBytes()` if available
- [ ] Compile down to ES5 (is that really still necessary?)

## License

MIT

Copyright (c) 2017 John Tasto

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