Package Exports
- validate-steuerid
- validate-steuerid/dist/main.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (validate-steuerid) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Description
Package to validate German tax ID / steuer ID
Installation
npm install validate-steueridyarn add validate-steueridUsage
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 stringsMethods
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.