From b487be048bb6d03f48f9c621a97d8f75cefc59fd Mon Sep 17 00:00:00 2001 From: Alexander Zeitler Date: Sun, 11 Apr 2021 19:39:44 +0200 Subject: [PATCH] refactor: replace variable by chaining --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1e9ea55..91cb683 100644 --- a/src/index.ts +++ b/src/index.ts @@ -83,8 +83,7 @@ export const mapPorts = ( const result = !ports ? [] : (() => { - const allPorts = ports.split(',') - return allPorts.map((untypedPort) => { + return ports.split(',').map((untypedPort) => { const exposedFragments = untypedPort.trim().split('->') const [port, protocol] = exposedFragments.length === 1