# node-verhoeff

> Simple implementation of verhoeff checksum algorithm in NodeJS

Latest version **0.0.11** (published 2017-01-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-verhoeff
pnpm add node-verhoeff
yarn add node-verhoeff
bun add node-verhoeff
```

## 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.11 |
| Published | 2017-01-26 |
| First published | 2017-01-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Ankur Pandey |
| Maintainers | yuyudhan |

## Links

- npm: https://www.npmjs.com/package/node-verhoeff
- Repository: https://github.com/yuyudhan/verhoeff
- Homepage: https://github.com/yuyudhan/verhoeff#readme
- Issues: https://github.com/yuyudhan/verhoeff/issues
- npm.io page: https://npm.io/package/node-verhoeff

## Recent versions

- 0.0.11 (latest) — 2017-01-26
- 0.0.10 — 2017-01-26
- 0.0.9 — 2017-01-26
- 0.0.8 — 2017-01-26
- 0.0.6 — 2017-01-26
- 0.0.5 — 2017-01-25

## README

# Verhoeff
Simple implementation of verhoeff checksum implentation in node JS.

## Aadhaar numbers & verhoeff
Did you know aadhaar numbers have last digit as a verhoeff checksum. The idea behind this is to quickly identify typing/data-entry errors on the entry machine.

https://groups.google.com/forum/#!msg/aadhaarauth/eB5hOU-Qtq0/YDcWPdPOXowJ

# Usage
```sh
npm i node-verhoeff --save
```

```js
var verhoeff = require('node-verhoeff');

verhoeff.validateAadhaar('496858245152')
// should return true

verhoeff.generate([4, 9, 6, 8, 5, 8, 2, 4, 5, 1, 5]);
// should return 2, generates verhoeff checksum using the input array
```

##### Original code by
Sergey Petushkov, 2014

##### Understand the math
For more info on the algorithm: http://en.wikipedia.org/wiki/Verhoeff_algorithm
by

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