lame-url
v0.1.0
Published
the library has url parse and stringify function. it`s lameduck, but it`s nano-scaled.
Downloads
2
Readme
The library has url parse and stringify function.
⚠️⚠️⚠️ it is lameduck, because of that no query object no protocol no authentication.
but it is nano-scaled.
TODOs
- [x] parse function
- [ ] stringify function
- [ ] more test
Usage
const url = parse( "http://www.example.com/foo/bar?_sort=asc" );
console.log(url);
{
port: null,
resource: "www.example.com",
pathname: "foo/bar",
hash: "",
search: "_sort=asc",
href: "http://www.example.com/foo/bar?_sort=asc",
query: "_sort=asc"
}
Related repos
- parse-path if you need unbroken url, plz use this.
- url-parse
- URI.js more functions to mutate url
- domurl
- mini-url
- min-url