@lokal-id/core weekly downloads statistics
Indonesian data primitives for apps and AI agents: NIK, NPWP, phone numbers, Rupiah, terbilang, wilayah Kemendagri, and Samaran PII masking.
@lokal-id/core has 1,844 recorded weekly downloads on npm, ranking #1427 of 2,703 tracked listings.
About @lokal-id/core
@lokal-id/core
Indonesian data primitives for apps and AI agents: NIK, NPWP, phone numbers, Rupiah, terbilang, holidays and working days, Kemendagri regions with postal codes, and Samaran, which masks Indonesian personal data before it reaches an LLM and restores it afterwards.
No dependencies. Part of Lokal · Bahasa Indonesia
Install
npm install @lokal-id/core
For Python backends there is a port with identical results: pip install lokal-id (docs).
Usage
import { parseNik, parsePhone, formatRupiah, parseRupiah, terbilang, addWorkingDays, Samaran } from '@lokal-id/core';
import { listWilayah, searchWilayah, wilayahName, findByPostalCode, parseAlamat } from '@lokal-id/core/wilayah';
parseNik('3201011508950001', { lookupWilayah: wilayahName });
// { valid: true, province: 'Jawa Barat', regency: 'Kabupaten Bogor', gender: 'L', birthDate: '1995-08-15', … }
parsePhone('0812 3456 7890'); // { e164: '+6281234567890', operator: 'Telkomsel', … }
formatRupiah(1500000); // 'Rp1.500.000'
parseRupiah('sejuta setengah'); // { amount: 1500000, approximate: false }
terbilang(1500000, { currency: true }); // 'satu juta lima ratus ribu rupiah'
addWorkingDays('2026-03-17', 1); // '2026-03-25', skipping Nyepi and Lebaran
listWilayah('32.76'); // districts of Kota Depok
findByPostalCode('16431'); // villages that use this postal code
parseAlamat('Kebayoran Baru, Jaksel').kecamatan?.code; // '31.74.07'
Samaran
const samaran = new Samaran();
const { text } = samaran.mask('nama saya budi santoso, NIK 3201011508950001, HP 0812-3456-7890');
// 'nama saya [NAME_1], NIK [NIK_1], HP [PHONE_1]'
samaran.unmask(await llm(text)); // placeholders are replaced with the original values
The same value always gets the same placeholder, so the model can still deduplicate and join. Use mode: 'partial' for logs and admin screens (3201********0001).
With the Vercel AI SDK, wrap the model and every call is masked and restored, streaming and tool calls included:
import { wrapLanguageModel } from 'ai';
import { samaranMiddleware } from '@lokal-id/core/ai-sdk';
const model = wrapLanguageModel({ model: openai('gpt-5'), middleware: samaranMiddleware() });
@lokal-id/core/wilayah loads about 4.4 MB of region data and runs on Node only. The main entry point does not load it and is safe for browsers.
Data
| Data | Source |
|---|---|
| Regions: 38 provinces, 416 regencies, 98 cities, 7,285 districts, 8,496 kelurahan, 75,266 villages | cahyadsn/wilayah (MIT), following Kepmendagri 300.2.2-2138/2025 |
| Postal codes for all 83,762 villages | cahyadsn/wilayah_kodepos (MIT) |
| Holidays and cuti bersama for 2026 and 2027 | SKB 3 Menteri. Other years return an error, not a guess |
Detection limits and full documentation are in the Lokal README.
License
Description from the npm listing.
- indonesia
- nik
- npwp
- rupiah
- terbilang
- wilayah
- pii
- uu-pdp
- llm
- ai-sdk
- vercel-ai
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (1)Similar npm AI SDKs plugins
All 20 @lokal-id/core alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@lokal-id/core. First seen Oct 31, 2026; last successful collection Oct 31, 2026. See the methodology.