Package Exports
- gs1-price-verifier
- gs1-price-verifier/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gs1-price-verifier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gs1-price-verifier
A simple npm module for creating check digits for four-digit or five-digit price fields, otherwise known as 'price verifiers'.
For more information, please see the official GS1 standard.
Installation
npm install gs1-price-verifier
import gs1PriceVerifier from 'gs1-price-verifier'
Usage
gs1PriceVerifier(priceDigits)
priceDigits
should be a four or five digit purely numeric string (e.g. "1234" or "12345") depending on your barcode setup.
Values before the first significant digit should be padded with 0s.
For example, in a 4 digit system, $12.34 would be "1234" and $1.23 would be "0123"
In a 5 digit system, $12.34 would be "01234" and $1.23 would be "00123".