Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

good-try

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

good-try - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

package.json
{
"name": "good-try",
"version": "1.0.0",
"description": "{{data.description}}",
"version": "1.0.1",
"description": "Tries to execute sync/async function, returns a specified default value if the function throws",
"license": "MIT",

@@ -36,3 +36,6 @@ "repository": "astoilkov/good-try",

"keywords": [
"{{data.keywords}}"
"errors",
"try",
"catch",
"error handling"
],

@@ -39,0 +42,0 @@ "devDependencies": {

@@ -43,2 +43,6 @@ # `good-try`

If you use TypeScript, the types are well defined and won't let you make a mistake.
If you use TypeScript, the types are well defined and won't let you make a mistake.
## Related
- [settle-it](https://github.com/astoilkov/settle-it) – Like `Promise.allSettled()` but for sync and async functions. Similarly to `good-try` it handles sync/async functions that throw an error. However, it returns an object so you know if and what error was thrown.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc