UNPKG

rjweb-server

Version:

Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS

19 lines (18 loc) 431 B
import parseURL from "../functions/parseURL"; class URLObject { /** * Create a new URL object for an easy Wrapper of `url.parse()` * @since 5.6.0 */ constructor(url, method) { const parsed = parseURL(url); this.href = parsed.href; this.path = parsed.path; this.query = parsed.query; this.fragments = parsed.fragments; this.method = method.toUpperCase(); } } export { URLObject as default };