Skip to content

Node.js "preprocessor" script to log from comments

bbarrows.com
1 pointbebrws1 comment
On HN

Comments

Yes, I know we should all be good enough to not need to ever use console.log statements, or to even iterate for that matter but sometimes I find myself tired and working on a project and just want to double check my data structure is in the correct state. If I use console.log I risk the chance of forgetting that line of code and submitting it to LeetCode which will cause a failure. Using this comment based approach makes logging easier and is "LeetCode safe" in that no console.log statements will ever be executed.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.