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

kramank

v0.1.0

Published

Zero-dependency validators for Indian GSTIN, PAN, IFSC, and pincode formats — checksum-verified, TypeScript-first.

Readme

kramank

Zero-dependency validators for Indian identifiers: GSTIN, PAN, IFSC, and pincode. Checksum-verified where a checksum exists (GSTIN), TypeScript-first, works in Node, browsers, and edge runtimes (no Node built-ins used).

Format validation only. These functions check that a string is a well-formed GSTIN/PAN/IFSC/pincode. They do not confirm the value is real, active, or currently registered with GSTN, the Income Tax Department, or a bank — that requires a live lookup against those systems, which this package does not do.

Install

npm install kramank

Usage

import { validateGstin, validatePan, validateIfsc, validatePincode } from 'kramank';

validateGstin('27AAPFU0939F1ZV');
// {
//   valid: true,
//   input: '27AAPFU0939F1ZV',
//   errors: [],
//   warnings: [],
//   stateCode: '27',
//   state: 'Maharashtra',
//   category: 'REGULAR',
//   pan: 'AAPFU0939F',
//   panEntityType: 'Firm',
//   note: 'Format check only — does not confirm this value is real, active, or currently registered.'
// }

validatePan('ABCPD1234E');
// { valid: true, entityType: 'Individual', ... }

validateIfsc('HDFC0001234');
// { valid: true, bankCode: 'HDFC', ... }

validatePincode('110001');
// { valid: true, zoneDigit: '1', zone: 'Northern Region — ...', ... }

Every validator returns the same shape — never a bare boolean:

interface ValidationResult {
  valid: boolean;
  input: string;              // trimmed, normalized
  errors: { code: string; message: string }[];
  warnings: { code: string; message: string }[];
  // ...plus decoded fields specific to each identifier
}

So a failed validation always tells you why (errors[0].code), not just that it failed.

What this package does not do

  • No network calls, no live registry lookups, no "is this GSTIN actually registered" check.
  • No maintained reference data for IFSC branches or pincode post offices — just the structural/zone rules encoded in the formats themselves.

The hosted Kramank API

Kramank (क्रमांक, "number") is a hosted API that builds on these same validators and adds what a pure format check can't give you:

  • IFSC lookup — real bank, branch, and address data for a given IFSC code, kept up to date.
  • Pincode lookup — real post office, district, and state data for a given pincode.
  • The same GSTIN/PAN/IFSC/pincode format validation as this package, as a hosted endpoint — useful if you'd rather not vendor the logic at all.

See the API reference for endpoints and free-tier limits, or get a key directly on RapidAPI — BASIC (free, 500 requests/month) and PRO ($9/month, 50,000 requests/month) are both live.

License

MIT