From bf5f41939cf996a6e5f1082b5200d63aba1b3650 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 17 Jan 2024 12:38:36 -0800 Subject: [PATCH] fix: code formatting --- lib/package-envs.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/package-envs.js b/lib/package-envs.js index 6b538e5..aa935b2 100644 --- a/lib/package-envs.js +++ b/lib/package-envs.js @@ -1,8 +1,14 @@ // https://github.com/npm/rfcs/pull/183 -const envVal = val => Array.isArray(val) ? val.map(v => envVal(v)).join('\n\n') - : val === null || val === false ? '' - : String(val) +const envVal = val => { + if (Array.isArray(val)) { + return val.map(v => envVal(v)).join('\n\n') + } + if (val === null || val === false) { + return '' + } + return String(val) +} const packageEnvs = (env, vals, prefix) => { for (const [key, val] of Object.entries(vals)) {