Is there any way I can detect if the output from my Node.js script is being piped to something other then the terminal?
I would like some way of detecting if this is happening:
node myscript.js | less
Or if this is happening:
node myscript.js
Is there any way I can detect if the output from my Node.js script is being piped to something other then the terminal?
I would like some way of detecting if this is happening:
node myscript.js | less
Or if this is happening:
node myscript.js