Skip to content

AIDC Toolkit / GS1 / priceOrWeightCheckDigit

Function: priceOrWeightCheckDigit()

priceOrWeightCheckDigit(s): string

Defined in: src/check.ts:141

Calculate the price or weight check digit for a four-or five-digit numeric string as per section 7.9.3 of the GS1 General Specifications.

Parameters

s

string

Numeric string exactly four or five characters long.

Returns

string

Check digit 0-9 as a string.