Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Solve the try-catch hell using golang style error handling.

NotificationsYou must be signed in to change notification settings

klipitkas/await-to

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solve the try-catch hell using golang style error handling.

Install

npm i @klipitkas/await-to --save

Usage

import{to}from'await-to';constdoSomething=()=>{const[data,error]=awaitto(resolveOrRejectSomePromise());if(error){thrownewError("Whoops!");}returndata;}

Test

npm run test

About

Solve the try-catch hell using golang style error handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp