Skip to content

Commit

Permalink
fix: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jan 17, 2024
1 parent c0954f2 commit a28f9d4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/package-envs.js
Original file line number Diff line number Diff line change
@@ -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)) {
Expand Down

0 comments on commit a28f9d4

Please sign in to comment.