News for hackers. Stuff that matters.
Re:Pipe Operator (|>) For JavaScript by whstl on Sunday January 22, 2023 @02:31PM (#34481363)
Late reply, but I find that with a bit more of modernizing, and more consistent usage of chalk's arg-concatenation feature this can be turned into something much terser:

  const envs = Object.entries(envars).map(entry => entry.join('='));
  console.log(chalk.dim('$', ...envs, 'node', ...args));
I don't really have a point to make, perhaps just that there's often simplifications possible with extra creativity.

There are no comments on this comment yet.