Library: result return "format" index and not string

Created on 10 Feb 2020  路  2Comments  路  Source: zxing-js/library

result format data should be the string of type of barcode and not the index

barcode CODE128
text: "123.456789"
rawBytes: Uint8Array(20) [105, 12, 100, 19, 14, 99, 45, 67, 89, 7, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0]
numBits: 0
resultPoints: (2) [i, i]
format: 4
timestamp: 1581342070804
resultMetadata: null

feature request

Most helpful comment

It would be nice to have this function in the lib.

All 2 comments

I did a function to get the name like this:

```javascript
import { BarcodeFormat } from '@zxing/library';
const getFormat = value => Object.keys(BarcodeFormat).find(key => BarcodeFormat[key] === value);

It would be nice to have this function in the lib.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josephernest picture josephernest  路  8Comments

boruchsiper picture boruchsiper  路  7Comments

vinayak-dataman picture vinayak-dataman  路  10Comments

mattmahn picture mattmahn  路  7Comments

Mazecreator picture Mazecreator  路  10Comments