This video shows how to use the NPM debug module to avoid basic console.log statements.
NPM debug lets you use an environmental variable to conditionally write your log statements.
Sample Code GIST: [ Ссылка ]
Debug reference site: [ Ссылка ]
MacOS command to run debug:
DEBUG=app node main.js
Windows CMD command to run debug:
SET DEBUG=app & node main.js
Ещё видео!