Socket
Socket
Sign inDemoInstall

await-to-done

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    await-to-done

Async await wrapper for easy error handling


Version published
Maintainers
1
Install size
93.3 kB
Created

Changelog

Source

2023.11.13 v1.0.2

  1. Code Optimization

Readme

Source

await-to-done

Async await wrapper for easy error handling

NPM version Codacy Badge typescript Test coverage npm download gzip License

Sonar

DocumentationChange Log

Read this in other languages: English | 简体中文

Installing

# use pnpm
$ pnpm install await-to-done

# use npm
$ npm install await-to-done --save

Usage

ES6 module

import to from 'await-to-done'

const [err, data] = await to(/* promise function */)

Node.js require

const to = require('await-to-done')

const [err, data] = await to(/* promise function */)

Using unpkg CDN

<script src="https://unpkg.com/await-to-done@latest/dist/index.global.prod.js"></script>
<script>
  ;(async () => {
    const to = window.awaitToDone
    const [err, data] = await to(/* promise function */)
  })()
</script>

Support & Issues

Please open an issue here.

License

MIT

Keywords

FAQs

Last updated on 13 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc