From 241d3e799e1bcebe815760e65f811ace4344991b Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Sat, 10 Jan 2026 08:55:00 -0600 Subject: [PATCH] Use less ambiguous funcion --- express/cli.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/express/cli.ts b/express/cli.ts index e161360..b9dbed4 100644 --- a/express/cli.ts +++ b/express/cli.ts @@ -30,7 +30,7 @@ function parseListenAddress(listen: string | undefined): { if (lastColon === -1) { // Just a port number const port = parseInt(listen, 10); - if (isNaN(port)) { + if (Number.isNaN(port)) { throw new Error(`Invalid listen address: ${listen}`); } return { host: defaultHost, port }; @@ -39,7 +39,7 @@ function parseListenAddress(listen: string | undefined): { const host = listen.slice(0, lastColon); const port = parseInt(listen.slice(lastColon + 1), 10); - if (isNaN(port)) { + if (Number.isNaN(port)) { throw new Error(`Invalid port in listen address: ${listen}`); }