4 ms·
For me not. In the Pipe example you must read first that something is done with the object and that it will be output at the end. If i read a code and i want t
by progx 4y ago
For me not. In the Pipe example you must read first that something is done with the object and that it will be output at the end.
If i read a code and i want to now what it will do, i wanna first read that it will output something. If that is what i search for, i read the nested code.
With the pipe style i waste more time, even if the code looks clearer.
I not overused example could look like this:
console.log(
Object.keys(envars)
.map(envar => `${envar}=${envars[envar]}`)
.join(' ')
|> `$ ${%}`
|> chalk.dim(%, 'node', args.join(' '))
)
If i don't care about console.log, i don't have to read the nested code.