Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huanz/urlparse
a perfect javascript url parse tool
https://github.com/huanz/urlparse
Last synced: about 6 hours ago
JSON representation
a perfect javascript url parse tool
- Host: GitHub
- URL: https://github.com/huanz/urlparse
- Owner: huanz
- Created: 2015-03-17T01:25:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-17T01:54:14.000Z (over 9 years ago)
- Last Synced: 2024-04-16T00:55:20.563Z (7 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# urlparse.js
a javascript tool to parse url# Usage
urlParse('http://w3cboy.com/post/2015/03/%E6%8A%93%E5%8C%85%E7%A5%9E%E5%99%A8Fiddler/index.html?key=123&key=456&q=w3cboy&keyword=%E6%8A%93%E5%8C%85%E7%A5%9E%E5%99%A8#index')
//return
{
hash: "index",
host: "w3cboy.com",
password: undefined,
path: "/post/2015/03/抓包神器Fiddler/index.html",
port: 80,
protocol: "http",
query: {
key: ['123', '456'],
keyword: "抓包神器",
q: 'w3cboy'
},
queryString: "key=123&key=456&q=w3cboy&keyword=抓包神器",
url: "http://w3cboy.com/post/2015/03/抓包神器Fiddler/index.html?key=123&key=456&q=w3cboy&keyword=抓包神器#index",
user: undefined
}