barcode-binary-is-valid
v1.0.2
Published
Checks binary value of a barcode to see if it's valid
Downloads
3
Readme
barcode-binary-is-valid
Install
$ npm install --save barcode-binary-is-valid
Usage
const barcodeBinaryIsValid = require('barcode-binary-is-valid');
barcodeBinaryIsValid('10100011010110001001100100011010001101000110101010111001011001101101100100111011001101000100101')
//=> true
barcodeBinaryIsValid('10110011')
//=> {
success: false,
message: 'Incorrect length: Should have 95 bits'
code: 'LENGTH',
}
API
barcodeBinaryIsValid(bars)
Returns barcode in binary
bars
Type: string
A binary representation of the barcode in binary.
License
MIT