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

@outloud/birth-number

v1.0.1

Published

TypeScript library for parsing, validating, and extracting information from Slovak and Czech birth numbers (rodné číslo).

Readme

Slovak/Czech Birth Number Validator

A TypeScript library for parsing, validating, and extracting information from Slovak and Czech birth numbers (rodné číslo). Birth numbers are unique personal identifiers used in Slovakia and the Czech Republic that encode date of birth, gender, and other demographic information.

Inspired by rodnecislo.

Installation

npm install @outloud/birth-number

Usage

import { BirthNumber, parseBirthNumber } from '@outloud/birth-number'

// Using the class constructor
new BirthNumber('990101/1234')

// Or using the helper function
parseBirthNumber('990101/1234')

Validation

const birthNumber = parseBirthNumber('990101/1234')

// Check if the birth number is valid (format, checksum, and valid date)
console.log(birthNumber.isValid) // true or false

// Check if the format is possible (less strict, only format check)
console.log(birthNumber.isPossible) // true or false

Extracting Information

const birthNumber = parseBirthNumber('990101/1234')

// Get birth date as a Date object
console.log(birthNumber.birthDate) // Date object or null

// Get age (calculated from current date)
console.log(birthNumber.age) // number

// Check if person is an adult (18+ by default)
console.log(birthNumber.isAdult) // true or false

Gender Detection

const bn = parseBirthNumber('990101/1234')

// Get gender
console.log(bn.gender) // 'male' or 'female'

// Check specific gender
console.log(bn.isMale) // true or false
console.log(bn.isFemale) // true or false

Foreign Birth Numbers

Birth numbers assigned to foreigners have a different month encoding (month + 20 or month + 70 for women).

const bn = parseBirthNumber('992101/1234')

// Check if it's a foreign birth number
console.log(bn.isForeign) // true or false

Format Support

The library supports both formats:

  • Short format (9 digits): YYMMDD/XXX - used until December 31, 1953
  • Long format (10 digits): YYMMDD/XXXX - used since January 1, 1954
// Without slash separator
parseBirthNumber('9901011234')

// With slash separator
parseBirthNumber('990101/1234')

// Short format (9 digits)
parseBirthNumber('530101/123')

Complete Example

import { parseBirthNumber } from '@outloud/birth-number'

const bn = parseBirthNumber('755101/1234')

if (bn.isValid) {
  console.log(`Gender: ${bn.gender}`)
  console.log(`Birth Date: ${bn.birthDate?.toLocaleDateString()}`)
  console.log(`Age: ${bn.age}`)
  console.log(`Is Adult: ${bn.isAdult}`)
  console.log(`Is Foreign: ${bn.isForeign}`)
} else {
  console.log('Invalid birth number')
}