Echo JS 0.11.0

<~>
sbruchmann 2141 days ago. link 1 point
Why use a built-in language feature when a third-party solution is just one `npm install` away, amirite?

Replies

DrJume 2141 days ago. link 1 point
It allows to program with catching errors as seen in Googles language Go.

They don't use the cascading try catch block, but instead a inline solution, where the execution of a function returns two values at once: the data and error. 
With this you can easily handle the error without cascading try catch blocks.

My library (size of 1 script) tries to emulate this coding pattern.
DrJume 2141 days ago. link 1 point
The motivation of this little snippet is to be a wrapper, which tries your function or promise, so that you have cleaner code.
Supposing you use try and catch on every exection of a promise or function and attach a console log with an error code, this library does it for you.

You don't need to npm install it: just copy the script :)