Gathering detailed insights and metrics for format-utils
Gathering detailed insights and metrics for format-utils
Gathering detailed insights and metrics for format-utils
Gathering detailed insights and metrics for format-utils
@formatjs/intl-utils
Smartly determine best unit for relative time format
@stdlib/string-format
Insert supplied variable values into a format string.
@stdlib/string-base-format-tokenize
Tokenize a string into an array of string parts and format identifier objects.
@stdlib/string-base-format-interpolate
Generate string from a token array by interpolating values.
Utilities for validating various formats of Indian system codes like Mobile, PAN, AADHAAR, GST, and more!
npm install format-utils
Typescript
Module System
Node Version
NPM Version
TypeScript (87.79%)
JavaScript (12.21%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
25 Stars
3,503 Commits
4 Forks
3 Watchers
1 Branches
2 Contributors
Updated on Jul 16, 2025
Latest Version
0.0.12
Package Id
format-utils@0.0.12
Unpacked Size
19.23 kB
Size
6.54 kB
File Count
12
NPM Version
10.9.2
Node Version
23.9.0
Published on
Jul 05, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
19
Utilities for validating various formats of Indian system codes like Mobile, PAN, AADHAAR, GST and more!
1npm install format-utils --save
1const { Validator } = require('format-utils');
OR
1import { Validator } from 'format-utils';
A mobile is a 10 digit numerical code starting with either 6, 7, 8, 9.
1let isValid = Validator.mobile('9876543210'); 2// isValid = true 3 4isValid = Validator.mobile('5678943210'); 5// isValid = false
A pincode is a 6 digit numeric code used by Indian Post.
1
to 9
.00000
to 99999
.1let isValid = Validator.pincode('400001'); 2// isValid = true 3 4isValid = Validator.pincode('0123456'); 5// isValid = false
A PAN is a 10 digit alphanumeric code issued by Income Tax Department of India.
AAA
to ZZZ
.P
stands for IndividualC
stands for CompanyH
stands for Hindu Undivided Family (HUF)A
stands for Association of Persons (AOP)B
stands for Body of Individuals (BOI)G
stands for Government AgencyJ
stands for Artificial Juridical PersonL
stands for Local AuthorityF
stands for Firm/ Limited Liability PartnershipT
stands for Trust0001
to 9999
.Visit this to know more about PAN.
1let isValid = Validator.pan('ALWPG5809L'); 2// isValid = true 3 4isValid = Validator.pan('ABAB12345Y'); 5// isValid = false
A TAN is a 10 digit alphanumeric code.
AAAA
to ZZZZ
.00001
to 99999
.1let isValid = Validator.tan('RAJA99999B'); 2// isValid = true 3 4isValid = Validator.tan('RAJA999991'); 5// isValid = false
A UAN is a 12 digit numberic code that is issued to member of the Employees’ Provident Fund Organisation (EPFO).
1let isValid = Validator.uan('987654321098'); 2// isValid = true 3 4isValid = Validator.uan('A98765432109'); 5// isValid = false
A IFSC is a 11 digit alphanumberic code that is issued to member of the Employees’ Provident Fund Organisation (EPFO).
0
).1let isValid = Validator.ifsc('SBIN0011569'); 2// isValid = true 3 4isValid = Validator.ifsc('BK1D0006046'); 5// isValid = false
A ESIC code is a 17 digit numerical code that is issued by Employee State Insurance Corporation.
1let isValid = Validator.esic('12345678901234567'); 2// isValid = true 3 4isValid = Validator.esic('1234567890123456'); 5// isValid = false
A IMEI is a 15 digit numeric code to identify mobile phones, as well as some satellite phones. The last digit of IMEI is a Luhn check digit.
1let isValid = Validator.imei('490154203237518'); 2// isValid = true 3 4isValid = Validator.imei('490154203237519'); 5// isValid = false
Aadhaar is a 12 digit numberic code that can be obtained by residents or passport holders of India, based on their biometric and demographic data.
2
and 9
.1let isValid = Validator.aadhaar('234567890124'); 2// isValid = true 3 4isValid = Validator.aadhaar('187654321096'); 5// isValid = false
Aadhaar VID is a 16 digit numberic code that can be used instead of Aadhaar number at the time of authentication to avoid sharing of Aadhaar number. The last digit is a Verhoeff check digit.
1let isValid = Validator.aadhaarVID('9876543210987659'); 2// isValid = true 3 4isValid = Validator.aadhaarVID('6234897234982734'); 5// isValid = false
A GISTIN is a 15 digit alphanumeric code assigned to a business or person registered under the GST Act.
01
to 37
denoting state code.Z
by default.1let isValid = Validator.gst('22ALJPT5243L1ZS'); 2// isValid = true 3 4isValid = Validator.gst('22ALJPT5243L1ZB'); 5// isValid = false
A vehicle number plate is an alphanumeric code assigned to a vehicle registered in India.
The current format of the registration index consists of 4 parts.
1let isValid = Validator.vehicleRegistration('DL4CAF4943'); 2// isValid = true 3 4isValid = Validator.vehicleRegistration('DL4CAF494G'); 5// isValid = false
A VPA / UPI (Unified Payment Interface) ID is a unique id generated for use of UPI in India.
-
), underscore (_
) and dot (.
) as part of identification.@
sign.Option | Type | Default | Description |
---|---|---|---|
maxLength | number | 50 | Maximum length of the VPA address including @ sign & the handle. |
handles | boolean | string[] | false | Whether to do additional check of verifying the handle. When it is true the handle part is checked against default handles listed in vpa-handles.json. When it is string[] the handle part is checked against merged list of default handles listed in vpa-handles.json and the ones given as input. |
1let isValid = Validator.vpa('amazing-uid@upi'); 2// isValid = true 3 4isValid = Validator.vpa('with@at@upi'); 5// isValid = false
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
30 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
Found 1/3 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More