validate-steuerid
v1.0.4
Published
Package to validate German tax ID / steuer ID
Downloads
12,194
Maintainers
Readme
Description
Package to validate German tax ID / steuer ID
Installation
npm install validate-steuerid
yarn add validate-steuerid
Usage
You can either validate steuerId or generate a valid steuerId
import { isSteuerIdValid, generateSteuerId, generateUniqueSteuerIds } from 'validate-steuerid'
isSteuerIdValid('65299970480')
// => false
isSteuerIdValid('65929970489')
// => true
isSteuerIdValid('26954371827')
// => true
generateSteuerId()
// => random steuerId string
generateUniqueSteuerIds(2)
// => array of 2 unique steuer id strings
Methods
isSteuerIdValid(steuerId)
Takes
steuerId
:- type:
string
- type:
Returns
boolean
generateSteuerId()
Returns
string
generateUniqueSteuerIds(numberOfSteuerIds)
Takes
numberOfSteuerIds
:- type:
number
- type:
Returns
Array
:- type:
string
- type:
References
For developing the algorithm, we referenced the European Commission's TIN check modules stated here.
THE USE OF THE GENERATOR METHOD IS INTENDED FOR TESTING PURPOSES ONLY. THE NUMBERS GENERATED BY IT ARE COMPLETELY RANDOM AND ARE NOT MEANT TO BE USED IN ANY OFFICIAL CAPACITY.