Skip to content

Instantly share code, notes, and snippets.

@benatkin
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benatkin/96ecd216e8f2ff722dc6 to your computer and use it in GitHub Desktop.
Save benatkin/96ecd216e8f2ff722dc6 to your computer and use it in GitHub Desktop.
node repl tricks
// 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