mirror of
https://github.com/danbulant/docker-compose
synced 2026-06-24 17:31:53 +00:00
refactor: replace variable by chaining
This commit is contained in:
parent
57f00b36fe
commit
b487be048b
1 changed files with 1 additions and 2 deletions
|
|
@ -83,8 +83,7 @@ export const mapPorts = (
|
||||||
const result = !ports
|
const result = !ports
|
||||||
? []
|
? []
|
||||||
: (() => {
|
: (() => {
|
||||||
const allPorts = ports.split(',')
|
return ports.split(',').map((untypedPort) => {
|
||||||
return allPorts.map((untypedPort) => {
|
|
||||||
const exposedFragments = untypedPort.trim().split('->')
|
const exposedFragments = untypedPort.trim().split('->')
|
||||||
const [port, protocol] =
|
const [port, protocol] =
|
||||||
exposedFragments.length === 1
|
exposedFragments.length === 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue