Node's URL property
1.parse: [Function:urlparse],
2.format: [Function:urlformat],
3.resolve: [Function:urlresolve],
4.resolveObject: [Function:urlresolveobject],
5.URL: [Function:url],
6.URLSearchParams: [Function:urlsearchparams],
7.domainToASCII: [Function:domaintoascii],
8.domainToUnicode: [Function:domaintounicode]
A. cmd command line Input "node" To enter node execution environment
1.parse: [Function:urlparse]
Resolves the URL address, the second parameter is true, and the query resolves to become the object pattern url.parse ("http://www.imooc.com/video/6710", True) URL { protocol: ' http: ', slashes:true, auth:null, host: ' www.imooc.com ', port:null, hostname: ' www.imooc.com ', Hash:null, search: ', query: {}, pathname: '/video/6710 ', path: '/video/6710 ', href: ' http:/ /www.imooc.com/video/6710 '} The second argument is true, the resolved query is the object pattern query: {form: "Scott", "Course": "Node"}
2.format: [Function:urlformat]
Restore URL address Url.format ({ protocol: ' http: ', slashes:true, auth:null, host: ' Www.imooc.com ', Port:null, hostname: ' www.imooc.com ', hash:null, search:null, query:null, pathname: '/ video/6710 ', path: '/video/6710 ', href: ' http://www.imooc.com/video/6710 '})
3.resolve: [Function:urlresolve]
Stitching into legal attribute url.resolve ("http://www.imooc.com/", "/video/6710"); ' http://www.imooc.com/video/6710 '
URL Properties for 3.node