Programming/Javascript
url, query string 모듈
const url = require("url"); const querystring = require("querystring"); const parsed = url.parse("https://nyaongnyaong.com/40?category=833145"); console.log(parsed); console.log(querystring.parse(parsed.query)); console.log(parsed); => { protocol: 'https:', slashes: true, auth: null, host: 'nyaongnyaong.com', port: null, hostname: 'nyaongnyaong.com', hash: null, search: '?category=833145', query..
2021. 11. 19. 17:26