@xmini/qs
Version:
qs
35 lines (30 loc) • 3.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.URL = void 0;
/**
* http://nodejs.cn/api/url.html#url_url_strings_and_url_objects
*
* http://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│ href │
├──────────┬──┬─────────────────────┬─────────────────────┬───────────────────────────┬───────┤
│ protocol │ │ auth │ host │ path │ hash │
│ │ │ ├──────────────┬──────┼──────────┬────────────────┤ │
│ │ │ │ hostname │ port │ pathname │ search │ │
│ │ │ │ │ │ ├─┬──────────────┤ │
│ │ │ │ │ │ │ │ query │ │
" https: // user : pass @ sub.host.com : 8080 /p/a/t/h ? query=string #hash "
│ │ │ │ │ hostname │ port │ │ │ │
│ │ │ │ ├──────────────┴──────┤ │ │ │
│ protocol │ │ username │ password │ host │ │ │ │
├──────────┴──┴──────────┴──────────┴─────────────────────┤ │ │ │
│ origin │ pathname │ search │ hash │
├─────────────────────────────────────────────────────────┴──────────┴────────────────┴───────┤
│ href │
└─────────────────────────────────────────────────────────────────────────────────────────────┘
*/
const url = require('url');
const URL = url.URL;
exports.URL = URL;