Mighty but tiny URI parser
MIT License
Bot releases are hidden (Show)
First official version posted to npm. Thanks @galkn for package name parseuri
.
Improvements
Published by slevithan 5 months ago
This is a minor update, but includes a breaking change for a minor feature.
Breaking Changes
setSld
as setTlds
, and removed the extremely limited, built-in list of top-level domains (TLDs) that was included for illustrative purposes.New Features
setTlds
with an empty object.Improvements
Published by slevithan 5 months ago
This is a major, breaking change that comes 17 years after v1.2.2. It updates parseUri
’s API, adds new features, includes bug/security fixes, adds tests, uses modern JavaScript, becomes a truly universal URI parser, and remains tiny.
Breaking Changes
URL
object and other URI libraries: source
➜href
, userInfo
➜userinfo
, host
➜hostname
, relative
➜resource
, path
➜pathname
, file
➜filename
, anchor
➜fragment
, queryKey
➜queryParams
.queryParams
to be returned as a URLSearchParams
object, with support for multiple query keys with the same name.'default'
, 'friendly'
).'/entry'
to include {filename: 'entry'}
rather than treating 'entry'
as part of directory
.parseUri.options
properties, including the ability to rename URI keys or provide a non-standard query parser.New Features
origin
, host
, subdomain
, domain
, tld
, suffix
.
tld
includes limited/extensible support for second-level domains that should be treated as part of the top-level domain (ex: co.uk
).Improvements
http
, https
, ws
, wss
, ftp
) and protocol-relative URLs, for parsing accuracy and security.URL
constructor, and other libraries.Bug Fixes
@
in the resource led to incorrect parsing.@
in the resource.