Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: