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

@fauzitech/nusakit

v0.1.0

Published

Toolkit validasi & format data Indonesia — NIK, NPWP, nomor HP, Rupiah (+ terbilang), dan rekening bank. Zero dependencies, tree-shakeable, TypeScript. Validasi offline, tidak terhubung ke Dukcapil/DJP.

Readme

@fauzitech/nusakit

Toolkit validasi & format data Indonesia — NIK, NPWP, nomor HP, Rupiah (+ terbilang), dan rekening bank. Zero dependencies, tree-shakeable, TypeScript.

npm license

⚠️ Penting — baca dulu

  • Validasi bersifat struktural & offline. Library ini tidak terhubung ke Dukcapil, DJP, atau sistem perbankan. Data yang "valid" secara struktur belum tentu terdaftar resmi.
  • Kewajiban perlindungan data pribadi (UU PDP No. 27/2022) berada pada aplikasi yang memproses & menyimpan data, bukan pada utility ini. Library ini netral — ia hanya memvalidasi format angka yang sudah Anda miliki.
  • Modul dummy menghasilkan data untuk testing/seeding saja — bukan identitas asli. Jangan gunakan untuk membuat identitas palsu.

Install

npm install @fauzitech/nusakit

Pakai

Import seluruhnya, atau per-modul untuk bundle minimal:

import { validateNik, terbilang } from '@fauzitech/nusakit';
// atau
import { validateNik } from '@fauzitech/nusakit/nik';
import { terbilang } from '@fauzitech/nusakit/rupiah';

NIK

import { validateNik, isValidNik, parseNik } from '@fauzitech/nusakit/nik';

const r = validateNik('3171015708900002');
// {
//   valid: true,
//   info: {
//     province: 'DKI Jakarta', provinceCode: '31',
//     gender: 'P', birthDateISO: '1990-08-17', age: 35, serial: '0002', ...
//   }
// }

isValidNik('3171 0117 0890 0001'); // true (toleran spasi/titik)
parseNik('123');                   // null

Terurai: provinsi, kode kab/kota, kecamatan, tanggal lahir, jenis kelamin (perempuan = tanggal + 40), dan umur.

Rupiah & terbilang

import { formatRupiah, parseRupiah, terbilang, terbilangRupiah } from '@fauzitech/nusakit/rupiah';

formatRupiah(1500000);                 // "Rp 1.500.000"
formatRupiah(1500.5, { decimals: 2 }); // "Rp 1.500,50"
parseRupiah('Rp 1.500.000');           // 1500000

terbilang(1500000);        // "satu juta lima ratus ribu"
terbilang(1000);           // "seribu"
terbilangRupiah(1500000);  // "satu juta lima ratus ribu rupiah"

Nomor HP

import { validatePhone, formatPhone, detectOperator } from '@fauzitech/nusakit/phone';

formatPhone('081234567890', 'international'); // "+6281234567890"
formatPhone('+6281234567890', 'local');       // "081234567890"
detectOperator('081234567890');               // "Telkomsel"

Menerima 08xx, 8xx, 62xx, +62xx (toleran strip/spasi). Deteksi operator: Telkomsel, Indosat, XL, Axis, Tri, Smartfren.

NPWP

import { validateNpwp, formatNpwp } from '@fauzitech/nusakit/npwp';

formatNpwp('012345678901000'); // "01.234.567.8-901.000"
validateNpwp('3171011708900001').info.format; // 16 (format baru = NIK)

Mendukung format lama (15 digit) dan format baru (16 digit = NIK).

Bank & rekening

import { findBank, searchBank, validateAccount } from '@fauzitech/nusakit/bank';

findBank('014');                       // { code: '014', name: 'Bank Central Asia (BCA)', ... }
searchBank('mandiri');                 // [{ code: '008', ... }]
validateAccount('014', '1234567890');  // { valid: true, bank: {...} }

Validasi rekening bersifat struktural (panjang & digit), bukan verifikasi kepemilikan.

Data dummy (testing only)

import { dummyNik, dummyPhone, dummyNpwp } from '@fauzitech/nusakit/dummy';

dummyNik({ gender: 'P', provinceCode: '31', birthYear: 1995 });
dummyPhone();
dummyNpwp();

Menghasilkan data yang lolos validasi struktur — untuk unit test, seeding DB dev, fixture. Bukan identitas asli.

Lisensi

MIT © Muhammad Fauzi Azhar