Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
nusantara-valid
Advanced tools
Nusantara Valid is a data validator to validate any Indonesian specific civil data such as nik, nip, and many more.
Nusantara Valid is a data validator to validate any Indonesian specific civil data such as nik, nip, and many more.
There are some ways to import the package
Clone the repo:
git clone https://github.com/agraris/nusantara-valid.git
Install with npm:
npm install nusantara-valid
CDN from jsDelivr
https://cdn.jsdelivr.net/npm/nusantara-valid@0.3.0/dist/umd/nusantara-valid.min.js
The package includes multiple formats to support different build process.
script
tagWe provide compiled JS (nusantara-valid.js
), as well as compiled and minified JS (nusantara-valid.min.js
) in each module. Extended JS files (nusantara-valid.extended.js
and minified nusantara-valid.extended.min.js
) include additional PROVINCE_DATA such as regencies and districts also some additional verification process.
nusantara-valid/
└── dist/
├── cjs/
│ ├── nusantara-valid.extended.js
│ ├── nusantara-valid.extended.js.map
│ ├── nusantara-valid.extended.min.js
│ ├── nusantara-valid.extended.min.js.map
│ ├── nusantara-valid.js
│ ├── nusantara-valid.js.map
│ ├── nusantara-valid.min.js
│ └── nusantara-valid.min.js.map
├── esm/
│ ├── nusantara-valid.extended.js
│ ├── nusantara-valid.extended.js.map
│ ├── nusantara-valid.extended.min.js
│ ├── nusantara-valid.extended.min.js.map
│ ├── nusantara-valid.js
│ ├── nusantara-valid.js.map
│ ├── nusantara-valid.min.js
│ └── nusantara-valid.min.js.map
└── umd/
├── nusantara-valid.extended.js
├── nusantara-valid.extended.js.map
├── nusantara-valid.extended.min.js
├── nusantara-valid.extended.min.js.map
├── nusantara-valid.js
├── nusantara-valid.js.map
├── nusantara-valid.min.js
└── nusantara-valid.min.js.map
require()
)const NusantaraValid = require('nusantara-valid')
import
)import NusantaraValid from './node_modules/nusantara-valid/dist/esm/nusantara-valid.js'
<script></script>
)Local
<script src="../dist/umd/nusantara-valid.min.js"></script>
CDN
<script src="https://cdn.jsdelivr.net/npm/nusantara-valid@0.3.0/dist/umd/nusantara-valid.min.js"></script>
ATM Number (Nomor Rekening)
Result:
isValidATMNumber(atm: string);
isValidATMNumberWithComparison(atm: string, bankKey: string);
|
Bank
getDataBank(bankKey: string);
getDataBanks();
Result:
|
Cellular Number (Nomor HP)
isValidCellularNumber(cel: string);
isValidCellularNumberWithComparison(cel: string, providerKey: string);
getDataCellularNumber(cel: string);
formatCellularNumber(cel: string, int:boolean = false)
Result:
|
Cellular Provider
getDataCellularProvider(key: string);
getDataCellularProviders();
Result:
|
Credit Card Number
isValidCCNumber(cc: string);
formatCCNumber(cc: string);
Result:
|
E-Mail
isValidEmail(email: string);
Result:
|
Nomor Induk Kependudukan (NIK)
isValidNIK(nik: string);
isValidNIKWithComparison(nik: string, comparison: { provinceKy?: string, birthday?: string });
getDataNIK(nik: string);
Result:
|
Nomor Induk Pegawai Negeri Sipil (NIP)
isValidNIP(nip: string);
Result:
|
Nomor Induk Siswa Nasional (NISN)
isValidNISN(nisn: string);
Result:
|
Nomor Pokok Wajib Pajak (NPWP)
isValidNPWP(npwp: string);
formatNPWP(npwp: string);
Result:
|
Province
getDataProvince(key: string);
getDataProvinces();
Result:
|
Tanda Nomor Kendaraan Bermotor (TNKB)
isValidTNKB(tnkb: string);
getDataTNKB(tnkb: string);
Result:
|
Telephone Number (Nomor Telefon)
isValidTelephoneNumber(tel: string);
getDataTelephoneNumber(cel: string);
formatTelephoneNumber(tel: string, int:boolean = false)
Result:
|
ZIP Code (Kode POS)
isValidZIP(zip: string | number);
isValidZIPWithComparison(zip: string | number, comparison: { provinceKy?: string });
Result:
|
Province
getDataRegenciesInProvince(provinceBPSCode: string);
getDataDistrictsInRegency(regencyBPSCode: string);
Result:
|
Copyright (c) 2020 - Fajar Setya Budi.
Nusantara Valid released under the MIT License.
FAQs
Nusantara Valid is a data validator to validate any Indonesian specific civil data such as nik, nip, and many more.
The npm package nusantara-valid receives a total of 110 weekly downloads. As such, nusantara-valid popularity was classified as not popular.
We found that nusantara-valid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.