Last active
August 29, 2015 14:08
-
-
Save benatkin/96ecd216e8f2ff722dc6 to your computer and use it in GitHub Desktop.
node repl tricks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add ;0 to suppress long results, like a process or a mongoose connection | |
process;0 | |
// capture information from async calls. doesn't work on calls that use the arity. make a custom call for those. | |
var results = [], capture = function() { results.unshift([].slice.call(arguments)) } | |
// handle uncaught exceptions so a mistake in the console doesn't bounce you out of your session | |
process.on('uncaughtException', function(err) { console.log('***uncaught***', err); });0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment