Try.js
Examples are the best source of documentation - read spec/ directory content to find more of them.
install
npm install try
async usage (read directory content)
var Try = var fs = ; { //Try.pause() method returns a "resume" callback and pauses current execution. fs; } { if err throw err; var next = Try; files; } TrythrowFirstArgumentInArray { return Arrayprototypejoin; } { dirContent = result; } ;
sync usage
var Try = ;var result = 0; { return 1; } { return n + 1; } { return n * 2; } { result = n; }; ;
more examples
For more examples check out the spec/ directory