UNPKG

@hippy/debug-server-next

Version:
21 lines 504 B
import url from 'url'; function createSocketURL(parsedURL) { var protocol = parsedURL.protocol, hostname = parsedURL.hostname, port = parsedURL.port, pathname = parsedURL.pathname, hash = parsedURL.hash, role = parsedURL.role; return url.format({ protocol: protocol || 'ws:', hostname: hostname || 'localhost', port: port, pathname: pathname || '/ws', slashes: true, query: { hash: hash, role: role } }); } export default createSocketURL;