UNPKG

id-pl

Version:

Provides utility methods to validate and generate various identification numbers used in Poland such as NIP, REGON, PESEL, etc.

20 lines (15 loc) 374 B
'use strict'; function randomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } function isString(value) { return typeof value === 'string' } function summationReducer(accumulator, currentValue) { return accumulator + currentValue; } module.exports = { randomInt: randomInt, isString: isString, summationReducer: summationReducer };