I want to extract the price value from the GS1 data martix QR code value using Nodejs. Using the module
npm i gs1-barcode-parser
Tried the below throwing "parseBarcode" is not a function
const { parseBarcode } = require('gs1-barcode-parser');
let barcode = '\u001d01093393871222863922001405\u001d1522030631030006691095751410';
console.log(parseBarcode(barcode));
I would use the modded module
gs1-barcode-parser-mod2
Unfortunately your barcode seems to be invalid. You will need to decode from UTF-8 as that would result in
∞01093393871222863922001405∞1522030631030006691095751410
even then your barcode seems to have a missing prefix, called an Application Identifier or for short, AI (]xxxxx..
).A valid barcode example is given in the code snippet above.
More info about application identifiers