Javascript-Barcode-Reader
Simple & Fast Barcode decoder for Browsers and Node.js capapable of reading Code128 (UCC/EAN-128), Code93, Code39, Standard/Industrial 2 of 5, Interleaved 2 of 5, Codabar and EAN-13 barcodes.

Demo
http://mubaidr.js.org/Javascript-Barcode-Reader/
Available decoders
- EAN-13
- EAN-8
- Code-39
- Code-93
- Code-2of5
- standard
- Interleaved
- Codabar
- Code-128 (UCC/EAN-128)
Install
Recommended way to install is by using package manager (npm, yarn etc):
npm install --save javascript-barcode-reader
or use cdn:
or download manually:
How to use
Node.js
const javascriptBarcodeReader =
Using promise
Using await
try const code = await catch err console
Browser
javascriptBarcodeReader
will be available as global in Browsers.
Using promise
Using await
try const code = await catch err console
Tips
- Make sure the barcode image is the only thing in the image. Otherwise this script will most probably fail.
Known Issues
This script does not implement logic to locate/rotate barcode in the given image.
Contributing
All the modules are contianed in src
directory. If you implement a new module or update an existing one, then make sure to add/run tests by running:
npm test
Tests are defined in the __tests__
directory using Jest
.
There is no need to run build script before creating pull request.
Contributors
Thanks goes to these wonderful people (emoji key):
Cristian Nitescu 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!