gtin-generator

NPM module to generate random GTIN14 for testing

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gtin-generator
011.0.49 years ago9 years agoMinified + gzip package size for gtin-generator in KB

Readme

A small utility that generates random GTIN14 and Generates check digit for the input

Installation

$ npm install gtin-generator --save

API

var gtin = require('gtin-generator')

gtin.getGTIN()

Returns a random GTIN-14 with vaild check valid

gtin.calCulateCheckDigit("0441757123021")

Returns calculated check digit for the number provided in string format. Throws error if the argument is not a valid number.