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
8,010,286
Last Day
1,782
Last Week
81,642
Last Month
443,108
Last Year
4,301,624
63 Stars
283 Commits
44 Forks
3 Watching
5 Branches
20 Contributors
Latest Version
3.10.2
Package Id
postcode-validator@3.10.2
Unpacked Size
40.85 kB
Size
7.10 kB
File Count
15
NPM Version
10.8.2
Node Version
20.18.0
Publised On
10 Nov 2024
Cumulative downloads
Total Downloads
Last day
-91.2%
1,782
Compared to previous day
Last week
-24.4%
81,642
Compared to previous week
Last month
13.7%
443,108
Compared to previous month
Last year
136.7%
4,301,624
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
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
7 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 3/18 approved changesets -- score normalized to 1
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
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-16
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