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

ua-tax-number

v1.0.1

Published

Ukrainian Tax Number validation

Readme

ua-tax-number

Ukrainian Tax Number validation library

Methods to use

  • isValidIPN(ipn) validates the tax number and returns true or false
  • validateIPN(ipn) validates the tax number and returns the object with the valid property of true/false and error message in case of invalid number
  • getDataFromIPN in addition to validation result also returns the date of birth and gender based on the number provided (but only for the valid number)

Example of usage

const { isValidIPN, validateIPN, getDataFromIPN } = require('ua-tax-number');

// Example usage
const ipn = '3272518079'; // Replace with the actual IPN to validate
if (isValidIPN(ipn)) {
  console.log('Valid IPN:', ipn);
  const data = getDataFromIPN(ipn);
  console.log('IPN Data:', data);
}

// The above will output:
// Valid IPN: 3272518079
// IPN Data: {
//   valid: true,
//   data: {
//     ipn: '3272518079',
//     dateOfBirth: { year: 1989, month: 8, day: 7 },
//     gender: 'male',
//     serial: '180'
//   }
// }

// Validate IPN
const validationResult = validateIPN(ipn);
if (validationResult.valid) {
  console.log('IPN is valid');
}
// The above will output:
// IPN is valid (for 3272518079)

// Example of invalid IPN
const invalidIpn = '123456789'; // Invalid IPN (not 10 digits)
if (!isValidIPN(invalidIpn)) {
  console.error('Invalid IPN:', invalidIpn);
}
// The above will output:
// Invalid IPN: 123456789

Test Coverage

  • Current test coverage is 80%+ for statements

| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | |-----------------|---------|----------|---------|---------|-----------------------------| | All files | 84.94 | 46.66 | 100 | 84.94 | | | src | 85.07 | 50 | 100 | 85.07 | | | validation.ts | 85.07 | 50 | 100 | 85.07 | 6-7,19-20,28-29,34-35,46-47 | | src/utils | 84.61 | 33.33 | 100 | 84.61 | | | date.ts | 84.61 | 33.33 | 100 | 84.61 | 5-6,12-13 |

Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total