lint

f27b3361e5dab7fc8f8d706ac603bad09309051f

BPplays <andymalbp@gmail.com>

2 files changed, +7 -7Ignore whitespace
server.js+4 -4
@@ -289,11 +289,11 @@ if (dnsPreferIPv6) {
289289const ipOptions = [true, 'auto', false];
290290
291291if (!ipOptions.includes(enableIPv6)) {
292292 console.warn(color.red('`protocol: ipv6` option invalid'), "'\n use:"', ipOptions, "'\n setting to: auto"');
293293 enableIPv6 = 'auto';
294294}
295295if (!ipOptions.includes(enableIPv4)) {
296296 console.warn(color.red('`protocol: ipv4` option invalid'), "'\n use:"', ipOptions, "'\n setting to: auto"');
297297 enableIPv4 = 'auto';
298298}
299299
@@ -887,7 +887,7 @@ function createHttpsServer(url, ipVersion) {
887887 server.on('error', reject);
888888 server.on('listening', resolve);
889889
890890 let host = url.hostname;
891891 if (ipVersion === 6) host = urlHostnameToIPv6(url.hostname);
892892 server.listen({
893893 host: host,
@@ -910,7 +910,7 @@ function createHttpServer(url, ipVersion) {
910910 server.on('error', reject);
911911 server.on('listening', resolve);
912912
913913 let host = url.hostname;
914914 if (ipVersion === 6) host = urlHostnameToIPv6(url.hostname);
915915 server.listen({
916916 host: host,
src/util.js+3 -3
@@ -693,13 +693,13 @@ export function isValidUrl(url) {
693693}
694694
695695export function urlHostnameToIPv6(hostname) {
696696 if (hostname.startsWith("'["')) {
697697 hostname = hostname.slice(1);
698698 }
699699 if (hostname.endsWith("']"')) {
700700 hostname = hostname.slice(0, -1);
701701 }
702702 return hostname;
703703}
704704
705705export function stringToBool(str) {