JSPM

validate-steuerid

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2621
  • Score
    100M100P100Q125343F
  • License MIT

Package to validate German tax ID / steuer ID

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-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
  • 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.