good-try
Tries to execute a sync/async function, returns a specified default value if the function throws (by astoilkov)
await-to-js
Async await wrapper for easy error handling without try-catch (by scopsy)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
good-try | await-to-js | |
---|---|---|
1 | 6 | |
16 | 3,170 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | 3 months ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
good-try
Posts with mentions or reviews of good-try.
We have used some of these posts to build our list of alternatives
and similar projects.
await-to-js
Posts with mentions or reviews of await-to-js.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-01-06.
-
Handle Javascript errors like in Go
While writing this, I found that someone already thought about this much earlier than me, check out this article: https://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/
-
try/catch in TypeScript is such a gigantic pain in the ass. Even worse if used in Node, holy hell...
I've seen a nearly identical utility library called await-to-js but that's what I was going to suggest as well as the pattern does make error handling a lot easier and less nested.
- if err != nil for JavaScript
-
Stop catching errors in TypeScript; Use the Either type to make your code predictable
Someone even thought the same and made it a lib. https://github.com/scopsy/await-to-js
-
Cleaner async-await for asynchronous JavaScript
This was inspired by await-to-js library, and I use it in almost all my JS projects. Go give them a star.
-
Promisify functions and avoid callback hell | node js
Does this help? https://github.com/scopsy/await-to-js
What are some alternatives?
When comparing good-try and await-to-js you can also consider the following projects:
err2 - Automatic and modern error handling package for Go
ts-pattern - 🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.
awesome-errors - an error handling library
proposal-pattern-matching - Pattern matching syntax for ECMAScript
new-error - Production-grade error creation and serialization library designed for Typescript
ts-option
wari - A type-safe way to create and handle errors.
fawait - A javascript library for making await more functional