Gathering detailed insights and metrics for postcode-validator
Gathering detailed insights and metrics for postcode-validator
Gathering detailed insights and metrics for postcode-validator
Gathering detailed insights and metrics for postcode-validator
npm install postcode-validator
Typescript
Module System
Node Version
NPM Version
99.7
Supply Chain
82.5
Quality
83.3
Maintenance
100
Vulnerability
100
License
TypeScript (78.36%)
JavaScript (21.64%)
Total Downloads
10,268,334
Last Day
3,201
Last Week
94,814
Last Month
439,311
Last Year
4,999,459
MIT License
67 Stars
286 Commits
41 Forks
2 Watchers
6 Branches
21 Contributors
Updated on Apr 25, 2025
Minified
Minified + Gzipped
Latest Version
3.10.3
Package Id
postcode-validator@3.10.3
Unpacked Size
40.84 kB
Size
7.11 kB
File Count
15
NPM Version
10.8.2
Node Version
20.19.0
Published on
Apr 04, 2025
Cumulative downloads
Total Downloads
Last Day
100.3%
3,201
Compared to previous day
Last Week
-13.5%
94,814
Compared to previous week
Last Month
-8.7%
439,311
Compared to previous month
Last Year
79.6%
4,999,459
Compared to previous year
Node.js module for parsing and validating postcodes. Country specific validation is supported for most countries including GB, US, Canada, Japan and many others.
Note: I haven't tested all combinations of postcodes for the extended country regular expressions. Please raise a PR with necessary test coverage for as many countries possible.
1npm install postcode-validator
1// commonjs 2const { postcodeValidator, postcodeValidatorExistsForCountry } = require('postcode-validator'); 3// ES6 4import { postcodeValidator, postcodeValidatorExistsForCountry } from 'postcode-validator'; 5 6postcodeValidator('W85TT', 'GB'); // returns true 7postcodeValidator('1234567', 'GB'); // returns false 8 9postcodeValidatorExistsForCountry('GB'); // returns true 10postcodeValidatorExistsForCountry('Moon'); // returns false 11 12country codes: US, GB, CA, JP, INTL(International), etc
Run the unit tests with:
1npm test
Commit code using below npm script or just follow conventional commits for commit messages using git commit.
1npm run commit
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 4/19 approved changesets -- score normalized to 2
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-26
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