npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@exodus/stdnum

v1.3.1

Published

Library for validating and formatting standard numbers.

Readme

@exodus/stdnum

Library for validating and identifying tax IDs, national identification numbers, and passports across 70+ countries.

Built on top of stdnum, with additional validators and customizations tailored for KYC and payment platform integrations.

Installation

yarn add @exodus/stdnum

Usage

getDocumentType

Returns the document type abbreviation for a valid identification number. Useful for determining which type of ID was provided when multiple formats are accepted.

import { getDocumentType } from '@exodus/stdnum'

getDocumentType('US', '123-45-6789') // 'ssn'
getDocumentType('AR', '20-05536168-2') // 'cuil'
getDocumentType('AR', '12345678') // 'dni'
getDocumentType('AU', 'M1234567') // 'passport'
getDocumentType('US', 'invalid') // undefined

isValid

Simple boolean check for whether an identification number is valid for a given country.

import { isValid } from '@exodus/stdnum'

isValid('US', '123-45-6789') // true
isValid('US', 'invalid') // false

Supported Countries

| Country | Code | Document Types | | ---------------------- | ---- | ------------------------------------------ | | Albania | AL | NIPT | | Andorra | AD | NRT | | Argentina | AR | CBU, DNI, CUIL, Passport | | Armenia | AM | TIN, Passport | | Australia | AU | TFN, ABN, ACN, Passport | | Belarus | BY | UNP | | Belgium | BE | NRRN, VAT, Passport | | Belize | BZ | TIN | | Bosnia and Herzegovina | BA | JMBG | | Brazil | BR | CPF, CNPJ, Passport | | Bulgaria | BG | UCN, PNF, VAT, Passport | | Canada | CA | SIN, BC BHN, GST, PST, QST, Passport | | Chile | CL | RUN | | China | CN | RICN, USCC, Passport | | Colombia | CO | NIT | | Costa Rica | CR | CPF, CPJ, CR | | Croatia | HR | OIB | | Cyprus | CY | VAT | | Czech Republic | CZ | RC, DIC, Passport | | Denmark | DK | CPR, CVR | | Ecuador | EC | CI, RUC | | Egypt | EG | TN | | El Salvador | SV | NIT | | Estonia | EE | IK, KMKR, Passport | | Faroe Islands | FO | VN | | Finland | FI | HETU, ALV, Passport | | France | FR | SPI, NIR, SIREN, SIRET, VAT, Passport | | Germany | DE | Steuer ID, Passport, PWNR, STNR, SVNR, VAT | | Ghana | GH | TIN | | Greece | GR | AMKA, VAT | | Guatemala | GT | CUI, NIT | | Guinea | GN | NIFP | | Hungary | HU | ANUM | | Iceland | IS | Kennitala, VSK | | India | IN | PAN, Aadhaar, EPIC, GSTIN, VID, Passport | | Ireland | IE | PPSN, VAT, Passport | | Israel | IL | HP, IDNR | | Italy | IT | Codice Fiscale, AIC, VAT, Passport | | Japan | JP | My Number, CN, Passport | | Kenya | KE | PIN | | Latvia | LV | VAT | | Liechtenstein | LI | PEID | | Lithuania | LT | Asmens, PVM | | Luxembourg | LU | VAT | | Malta | MT | VAT | | Mauritius | MU | NID | | Mexico | MX | CURP, RFC, CLABE | | Moldova | MD | IDNO | | Monaco | MC | VAT | | Netherlands | NL | BSN, VAT, Passport | | New Zealand | NZ | IRD, Passport | | Norway | NO | Fødselsnummer, VAT, Orgnr | | Paraguay | PY | National ID, RUC | | Peru | PE | CUI, CE, RUC | | Philippines | PH | TIN, Passport | | Poland | PL | PESEL, VAT, Passport | | Portugal | PT | NIF, CC, Passport | | Romania | RO | CNP, VAT, Passport | | Russia | RU | INN, Passport | | Saudi Arabia | SA | TIN | | Serbia | RS | JMBG | | Slovakia | SK | VAT, RC | | Slovenia | SI | VAT, EMSO, TIN | | South Korea | KR | RRN, BRN, Passport | | Spain | ES | NIE, NIF, NSS, Passport | | Sweden | SE | TIN, VAT, Passport | | Switzerland | CH | AHV, UID, VAT, Passport | | Thailand | TH | TIN, Passport | | Tunisia | TN | MF | | United Arab Emirates | AE | Emirates ID | | United Kingdom | GB | NINO, UTR, VAT, Passport | | United States | US | SSN | | Uruguay | UY | CI, VAT, NIE |

Document Type Abbreviations

| Abbreviation | Full Name | | --------------- | ----------------------------------------------- | | aadhaar | Indian Unique Identification Number | | abn | Australian Business Number | | acn | Australian Company Number | | ahv | Swiss Social Security Number | | aic | Italian Pharmaceutical Product Code | | alv | Finnish VAT Number | | amka | Greek Social Security Number | | anum | Hungarian VAT Number | | asmens | Lithuanian Personal Code | | bc_bhn | British Columbia Birth Health Number | | brn | Korean Business Registration Number | | bsn | Dutch Citizen Service Number | | cbu | Argentine Bank Account Number | | cc | Portuguese Citizen Card | | ce | Peruvian Foreigner Card | | ci | Identity Card (Ecuador/Uruguay) | | clabe | Mexican Bank Account Number | | cn | Japanese Corporate Number | | cnp | Romanian Personal Numeric Code | | cnpj | Brazilian Company Taxpayer Registry | | cf | Italian Fiscal Code | | cpf | Brazilian/Costa Rican Individual Taxpayer ID | | cpj | Costa Rican Legal Entity ID | | cpr | Danish Personal Identification Number | | cr | Costa Rican ID | | cui | Personal ID (Guatemala/Peru) | | cuil | Argentine Labor Identification Code | | curp | Mexican Population Registry Code | | cvr | Danish Business Registration Number | | dic | Czech VAT Number | | dni | Argentine National Identity Document | | emirates_id | UAE Emirates ID | | emso | Slovenian Unique Master Citizen Number | | epic | Indian Voter ID Card | | fodselsnummer | Norwegian Birth Number | | gst | Canadian Goods and Services Tax Number | | gstin | Indian GST Identification Number | | hetu | Finnish Personal Identity Code | | hp | Israeli Company Number | | idno | Moldovan Company ID | | idnr | Israeli ID Number | | ik | Estonian Personal Identification Code | | inn | Russian Taxpayer Identification Number | | ird | New Zealand Inland Revenue Number | | jmbg | Unique Master Citizen Number (Bosnia/Serbia) | | kennitala | Icelandic Personal/Company ID | | kmkr | Estonian VAT Number | | mf | Tunisian Tax ID | | mn | Japanese My Number | | national_id | Paraguayan National ID | | nid | Mauritius National ID | | nie | Foreigner Identification Number (Spain/Uruguay) | | nif | Tax Identification Number (Spain/Portugal) | | nifp | Guinea Tax ID | | nino | UK National Insurance Number | | nipt | Albanian Business Tax Number | | nir | French Social Security Number | | nit | Tax ID Number (Colombia/Guatemala/El Salvador) | | nrrn | Belgian National Register Number | | nrt | Andorran Tax Number | | nss | Spanish Social Security Number | | oib | Croatian Personal Identification Number | | orgnr | Norwegian Organization Number | | pan | Indian Permanent Account Number | | passport | Passport Number | | peid | Liechtenstein Company ID | | pesel | Polish National Identification Number | | pin | Kenyan Personal Identification Number | | pnf | Bulgarian Foreigner Personal Number | | ppsn | Irish Personal Public Service Number | | pst | Canadian Provincial Sales Tax Number | | pvm | Lithuanian VAT Number | | pwnr | German Passport Card Number | | qst | Quebec Sales Tax Number | | rc | Birth Number (Czech/Slovakia) | | rfc | Mexican Federal Taxpayer Registry | | ricn | Chinese Resident Identity Card Number | | rrn | Korean Resident Registration Number | | ruc | Taxpayer Registry (Ecuador/Paraguay/Peru) | | run | Chilean National Identification Number | | sin | Canadian Social Insurance Number | | siren | French Company Registration Number | | siret | French Establishment Identification Number | | spi | French Tax Identification Number | | ssn | US Social Security Number | | steuer_id | German Tax Identification Number | | stnr | German Tax Number | | svnr | German Social Insurance Number | | tfn | Australian Tax File Number | | tin | Tax Identification Number (generic) | | tn | Egyptian Tax Number | | ucn | Bulgarian Unified Civil Number | | uid | Swiss Business ID | | unp | Belarusian Taxpayer Number | | uscc | Chinese Unified Social Credit Code | | utr | UK Unique Taxpayer Reference | | vat | Value Added Tax Number | | vid | Indian Virtual ID | | vn | Faroese V-Number | | vsk | Icelandic VAT Number |

License

MIT