urlStringify
Converts a structured URL object into a properly formatted URL string, handling all components including protocol, host, path, query parameters, and hash.
options
: URL components object with:
protocol
: URL protocol (e.g. 'https')hostname
: Domain nameport
: Port numberpathname
: URL path (default: '/')query
: Key-value pairs for query parametershash
: URL fragment identifierReturns a properly formatted URL string with all components.
{d: ['x', 'y']}
becomes ?d=x&d=y
)