Socket
Socket
Sign inDemoInstall

await-to-done

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

dist/index.esm-browser.js
/*!
* await-to-done v1.1.0
* await-to-done v1.1.1
* Async await wrapper for easy error handling

@@ -4,0 +4,0 @@ * (c) 2021-2024 saqqdy

/*!
* await-to-done v1.1.0
* await-to-done v1.1.1
* Async await wrapper for easy error handling

@@ -4,0 +4,0 @@ * (c) 2021-2024 saqqdy

/*!
* await-to-done v1.1.0
* await-to-done v1.1.1
* Async await wrapper for easy error handling

@@ -4,0 +4,0 @@ * (c) 2021-2024 saqqdy

/*!
* await-to-done v1.1.0
* await-to-done v1.1.1
* Async await wrapper for easy error handling

@@ -4,0 +4,0 @@ * (c) 2021-2024 saqqdy

{
"name": "await-to-done",
"description": "Async await wrapper for easy error handling",
"version": "1.1.0",
"packageManager": "pnpm@8.9.0",
"version": "1.1.1",
"packageManager": "pnpm@9.1.3",
"main": "dist/index.cjs.js",

@@ -7,0 +7,0 @@ "module": "dist/index.esm-bundler.js",

@@ -39,5 +39,7 @@ <div style="text-align: center;" align="center">

### ES6 module
### Simple Usage
```js
1. ES6 module
```ts
import to from 'await-to-done'

@@ -48,5 +50,5 @@

### Node.js require
2. Node.js require
```js
```ts
const to = require('await-to-done')

@@ -57,2 +59,15 @@

### Multiple Promises
```ts
import to from 'await-to-done'
const bar = () => new Promise<boolean>()
const foo = () => new Promise<string>()
const [err, data] = await to(bar(), foo()) // data = [boolean, string]
// or pass in an Array
const [err, data] = await to([bar(), foo()]) // data = [boolean, string]
```
### Using unpkg CDN

@@ -59,0 +74,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ī¸ by Socket Inc