1.0.3 • Published 8 months ago

url-new v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

cainiao-url

在使用的页面直接引用

npm i url-new --save

import URL from 'url-new'

const url = new URL('https://www.aaa.com:8989/bbb/ccc/ddd.html?e=1&f=2&g#h=3&i=4&j?k=5#l=6&e=4')

console.log(url)
{
  "href": "https://www.aaa.com:8989/bbb/ccc/ddd.html?e=1&f=2&g#h=3&i=4&j?k=5#l=6&e=4",
  "origin": "https://www.aaa.com",
  "protocol": "https:",
  "host": "www.aaa.com",
  "port": "8989",
  "pathname": "/bbb/ccc/ddd.html",
  "search": "?e=1&f=2&g&k=5",
  "hash": "#h=3&i=4&j&l=6&e=4",
  "params": {
    "h": "3",
    "i": "4",
    "l": "6",
    "e": "1",
    "f": "2",
    "k": "5"
  }
}
1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago