Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/wankdanker/gs1

gs1 checkdigit generation and validation in javascript
https://github.com/wankdanker/gs1

Last synced: 2 months ago
JSON representation

gs1 checkdigit generation and validation in javascript

Awesome Lists containing this project

README

        

gs1
---

Generate check digits for various gs1 formats.

GTIN-8, GTIN-12, GTIN-13, GTIN-14, GSIN, SSCC

usage
-----

```js
const gs1 = require('gs1')

console.log(gs1('2345678'));
//23456785

console.log(gs1.checkdigit('2345678'));
//5

console.log(gs1.validate('23456785'));
//true

console.log(gs1.validate('23456783'));
//false
```

license
-------

MIT