Skip to content

kontist/validate-steuerid

Repository files navigation

Description

Package to validate German tax ID / steuer ID

Installation

npm install validate-steuerid
yarn add validate-steuerid

Usage

As a module

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

Shell

yarn generateUniqueSteuerIds 20

Methods

isSteuerIdValid(steuerId)

  • Takes steuerId:

    • type: string
  • Returns boolean

generateSteuerId()

  • Returns string

generateUniqueSteuerIds(numberOfSteuerIds)

  • Takes numberOfSteuerIds:

    • type: number
  • Returns Array:

    • type: string

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.

About

Package to validate German tax ID / steuer ID

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •