Gathering detailed insights and metrics for url-parse-lax
Gathering detailed insights and metrics for url-parse-lax
Gathering detailed insights and metrics for url-parse-lax
Gathering detailed insights and metrics for url-parse-lax
url.parse() with support for protocol-less URLs & IPs
npm install url-parse-lax
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.4
Supply Chain
95.1
Quality
75.4
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
3,322,823,389
Last Day
458,629
Last Week
7,884,660
Last Month
34,991,387
Last Year
377,319,214
MIT License
53 Stars
20 Commits
7 Forks
6 Watchers
1 Branches
5 Contributors
Updated on Apr 01, 2025
Minified
Minified + Gzipped
Latest Version
5.0.0
Package Id
url-parse-lax@5.0.0
Size
2.11 kB
NPM Version
7.13.0
Node Version
16.2.0
Published on
Aug 09, 2021
Cumulative downloads
Total Downloads
Last Day
-18.8%
458,629
Compared to previous day
Last Week
-11.7%
7,884,660
Compared to previous week
Last Month
7.1%
34,991,387
Compared to previous month
Last Year
-8.6%
377,319,214
Compared to previous year
1
Lax
url.parse()
with support for protocol-less URLs & IPs
$ npm install url-parse-lax
1import urlParseLax from 'url-parse-lax'; 2 3urlParseLax('sindresorhus.com'); 4/* 5{ 6 protocol: 'https:', 7 slashes: true, 8 auth: null, 9 host: 'sindresorhus.com', 10 port: null, 11 hostname: 'sindresorhus.com', 12 hash: null, 13 search: null, 14 query: null, 15 pathname: '/', 16 path: '/', 17 href: 'https://sindresorhus.com/' 18} 19*/ 20 21urlParseLax('[2001:db8::]:8000'); 22/* 23{ 24 protocol: null, 25 slashes: true, 26 auth: null, 27 host: '[2001:db8::]:8000', 28 port: '8000', 29 hostname: '2001:db8::', 30 hash: null, 31 search: null, 32 query: null, 33 pathname: '/', 34 path: '/', 35 href: 'http://[2001:db8::]:8000/' 36} 37*/
And with the built-in url.parse()
:
1import url from 'url'; 2 3url.parse('sindresorhus.com'); 4/* 5{ 6 protocol: null, 7 slashes: null, 8 auth: null, 9 host: null, 10 port: null, 11 hostname: null, 12 hash: null, 13 search: null, 14 query: null, 15 pathname: 'sindresorhus', 16 path: 'sindresorhus', 17 href: 'sindresorhus' 18} 19*/ 20 21url.parse('[2001:db8::]:8000'); 22/* 23{ 24 protocol: null, 25 slashes: null, 26 auth: null, 27 host: null, 28 port: null, 29 hostname: null, 30 hash: null, 31 search: null, 32 query: null, 33 pathname: '[2001:db8::]:8000', 34 path: '[2001:db8::]:8000', 35 href: '[2001:db8::]:8000' 36} 37*/
Type: string
The URL to parse.
Type: object
Type: boolean
Default: true
Prepend https://
instead of http://
to protocol-less URLs.
url.format()
that formats a hostname and port into IPv6-compatible socket form of hostname:port
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 3/20 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
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
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-06-09
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