Skip to content

v1.0.0 - Initial Release

Choose a tag to compare

@AngusHsu AngusHsu released this 02 Nov 02:59
· 19 commits to main since this release

πŸŽ‰ Initial release of idnumbers package

Features

  • βœ… 80 countries supported - Comprehensive coverage across all continents
  • πŸ” Validation - Verify ID number format and checksums
  • πŸ“Š Parsing - Extract information like birth date, gender, and citizenship
  • πŸ›‘οΈ Type-safe - Full TypeScript support with type definitions
  • πŸ“¦ Zero dependencies - Lightweight and secure
  • ✨ Well-tested - 797 tests with 100% pass rate
  • 🌍 Multiple formats - Supports various ID number formats per country

Installation

npm install idnumbers

Quick Start

import { validateNationalId, parseIdInfo } from 'idnumbers';

// Validate a US Social Security Number
const result = validateNationalId('USA', '123-45-6789');
console.log(result.isValid); // true or false

// Parse information from a South African ID
const info = parseIdInfo('ZAF', '8001015009087');
console.log(info);
// {
//   yyyymmdd: Date(1980-01-01),
//   gender: 'male',
//   citizenship: 'citizen'
// }

Supported Countries

80+ countries including: USA, UK, France, Germany, Japan, China, India, Brazil, Canada, Australia, South Africa, and many more.

See full documentation: https://github.com/identique/idnumbers-npm#readme