4 ms·
You should not parse the stdout produced from console functions. It is for producing human-readable information. If you want machine-consumable data, you should
by snek 7y ago
You should not parse the stdout produced from console functions. It is for producing human-readable information. If you want machine-consumable data, you should use something like benchmark.js.
- nothrabannosir 7y agoHow far we have strayed from the days where Unix tools were meant to be used as a stdlib, called through stdin and out. It makes me a little sad. Classic HN comment on this topic: https://news.ycombinator.com/item?id=6530180 https://news.ycombinator.com/item?id=6530180
- snek 7y agoNot that far. Node has process.stdout/process.stdin/process.stderr. It's just that the console API is for debugging.
- BillinghamJ 7y agoThat's true of stderr output. You should be able to parse stdout though - otherwise how are you meant to use piping etc