X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Furi-js%2Fdist%2Fesnext%2Fschemes%2Fhttp.js;h=6abf0fe6e3f1f897c2066285f25476e4152712f4;hp=a280369881c13069354326abc0a404605a444abd;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hpb=b3950616b54221c40a7dab9099bda675007e5b6e diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/uri-js/dist/esnext/schemes/http.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/uri-js/dist/esnext/schemes/http.js index a2803698..6abf0fe6 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/uri-js/dist/esnext/schemes/http.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/uri-js/dist/esnext/schemes/http.js @@ -1,27 +1,28 @@ -const handler = { - scheme: "http", - domainHost: true, - parse: function (components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function (components, options) { - //normalize the default port - if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; -export default handler; +const handler = { + scheme: "http", + domainHost: true, + parse: function (components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function (components, options) { + const secure = String(components.scheme).toLowerCase() === "https"; + //normalize the default port + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; +export default handler; //# sourceMappingURL=http.js.map \ No newline at end of file