barcodeCheckDigit Function
Returns the GS1 modulo-10 check digit for a nonempty numeric body. Invalid bodies reject with an error.
Package: @txtextcontrol/tx-sheet-control.
Syntax
barcodeCheckDigit(body);
Example
Use an existing workbook as book.
const result = barcodeCheckDigit('590123412345');
Remarks
Pass only the numeric body, without its existing check digit. The function returns one digit as a string and rejects blank or nonnumeric bodies. It does not read workbook cells.
See Barcodes and QR Codes for supported payloads, quiet zones and examples.