4 ms·
it's still easy to read That’s highly subjective I’m afraid. “Take entries of envvars, turn that into k=v, join that by a space, make dim $, previous that, an
by wruza 4y ago
it's still easy to read
That’s highly subjective I’m afraid.
“Take entries of envvars, turn that into k=v, join that by a space, make dim $, previous that, and args, log that”.
Personally I have no clue what’s going on at first glance with all these %%% “thats”. It’s meant to be declarative, but reads imperatively instead.
console.log(chalk.dim(
'$',
...Object.keys(envars)
.map(k => `${k}=${envars[k]}`),
'node',
...args,
))
“Log dimmed $, k=v pairs of envvars, node, then args”.
- hajile 4y agoThat's why I prefer the F# version where it's just the names of functions or anonymous arrow functions. Nothing magical about them. It just calls the functions in order from top to bottom.