Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stdnum

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stdnum

Standard Number Validation

  • 0.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2K
decreased by-62.15%
Maintainers
1
Weekly downloads
 
Created
Source

Country Standard Numbers

Build

JavaScript (TypeScript) package to validate most all national numbers, with a focus on VAT, Person and Tax identifiers.

Quick start

import { stdnum } from 'stdnum';

const { isValid } = stdnum.br.cpf.validate('xyzzy');

// isValid is false

Supported Countries and Numbers

CountryCodeNameGroupMeaning
AlbaniaALNIPTVatVat Identifier (Numri i Identifikimit për Personin e Tatueshëm)
AndorraADNRTTaxTax Identifier (Número de Registre Tributari)
ArgentinaARCBUBankBank Account (Clave Bancaria Uniforme)
ArgentinaARCUITTaxTax Identity (Código Único de Identificación Tributaria)
ArgentinaARDNIPersonNational Identity (Documento Nacional de Identidad)
AustriaATBusinessidCompanyAustrian Company Register Numbers
AustriaATTINTaxAustrian tax identification number (Abgabenkontonummer)
AustriaATUIDVATAustrian VAT number (Umsatzsteuer-Identifikationsnummer)
AustriaATVNRPersonAustrian social security number(Versicherungsnummer)
AustraliaAUABNCompanyAustralian Business Number
AustraliaAUACNCompanyAustralian Company Number
AustraliaAUTFNTax/Person/CompanyAustralian Tax File Number
BelizeBZTINPerson/CompanyBrazilian Tax ID ()
BrazilBRCPFPersonBrazilian identity number (Cadastro de Pessoas Físicas)
BrazilBRCNPJCompanyBrazilian company number (Cadastro Nacional da Pessoa Jurídica)
CanadaCABNCompanyCompany Identifier (Canadian Business Number)
CanadaCASINPersonPerson Identifier (Social Insurance Number)
ChileCLRUTTaxTax Identifier (Rol Unico Tributario) [RUN]
ChinaCNRICPersonPerson Identifier (Chinese Resident Identity Card Number)
ChinaCNUSCCCompanyCompany Identifier (Unified Social Credit Code, 统一社会信用代码, China tax number)
ColumbiaCONITTaxTax Identifier (Número de Identificación Tributaria)
Costa RicaCRCPFPersonPerson Identifier (Cédula de Persona Física)
Costa RicaCRCPJCompanyCompany Identifier (Cédula de Persona Jurídica)
Costa RicaCRCRPersonPerson Identifier (Cédula de Residencia)
Dominican RepublicDOCEDULAPersonPerson Identifier (Cédula de Residencia)
Dominican RepublicDONCFVatTax Receipt Number (Números de Comprobante Fiscal)
Dominican RepublicDORNCTaxPerson Identifier (Registro Nacional del Contribuyente)
EcuadorECCIPersonEcuadorian person identifier (Cédula de identidad)
EcuadorECRUCTax/VatEcuadorian company tax number (Registro Único de Contribuyentes)
El SalvadorSVNITTaxTax Identifier (Número de Identificación Tributaria)
GuatemalaGTCUIPersonGuatemala person (Código Único de Identificación)
GuatemalaGTNITCompanyGuatemala company tax number (Número de Identificación Tributaria)
Hong KongHKHKIDPersonHong Kong Identity Card
IndonesiaIDNPWPPerson/CompanyNPWP (Nomor Pokok Wajib Pajak, Indonesian VAT Number).
IndiaINAADHAARCompanyIndian digital resident personal identity number
IndiaINPANPersonPermanent Account Number, Indian income tax identifier
JapanJPCNCompany法人番号, hōjin bangō, Japanese Corporate Number
South KoreaKRBRNCompany사업자 등록 번호, South Korea Business Registration Number)
South KoreaKRRRNPersonSouth Korean resident registration number
MexicoMXRFCTax/VatTax Identifier (Registro Federal de Contribuyentes)
MexicoMXCURPPersonIndividual Identifier (Clave Única de Registro de Población)
MexicoMXCLABEBankBank Account (Clave Bancaria Estandarizada)
MalaysiaMYNRICPersonMalaysian National Registration Identity Card Number
New ZealandNZIRDPerson/CompanyNew Zealand Inland Revenue Department (Te Tari Tāke) number
ParaguayPYRUCTax/VatTax Identifier (Registro Único de Contribuyentes)
PeruPECUIPersonPerson Identifier (Cédula Única de Identidad)
PeruPERUCTax/VatTax Identifier (Registro Único de Contribuyentes)
RussiaRUINNTax/VatTax Identifier (Идентификационный номер налогоплательщика)
SingaporeSGUENCompanySingapore's Unique Entity Number
ThailandTHIDNRPersonThai National ID (บัตรประจำตัวประชาชนไทย)
TaiwanTWUBNCompanyUnified Business Number, 統一編號, Taiwanese tax number
SpainESCIFTax/VatTax Identifier (Código de Identificación Fiscal)
SpainESDNIPersonIdentity code (Documento Nacional de Identidad)
SpainESNIEPersonIdentity code foreigner (Número de Identificación de Extranjero)
SpainESNIFTaxTax Identifier (Número de Identificación Fiscal)
UruguayUYRUTTax/VatTax Identifier (Registro Único Tributario)
UruguayUYCEDULAPersonPerson Identifier (Cédula de Residencia)
UruguayUYNIEPersonForeignersI identification Number
United StatesUSEINTax/CompanyTax Identifier (Employer Identification Number)
United StatesUSSSNTax/IndividualTax Identifier (Social Security Number)
VenezuelanVERIFVatVat Identifier (Registro de Identificación Fiscal)
VietnamVNMSTCompanyMã số thuế, Vietnam tax number
South AfricaZAIDNRPersonID number (South African Identity Document number).
South AfricaZATINPerson/CompanyTIN (South African Tax Identification Number).

Examples

TODO -- Usage examples

Credits

Thanks to python-stdnum for providing the inspiration and many of the checksum algorithm sources

References

https://wiki.scn.sap.com/wiki/display/CRM/Country+Tax+Category+check

Keywords

FAQs

Package last updated on 30 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc