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

awaitability

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awaitability

Utilities for composing async/await functions.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Promises are in core, async / await is almost here, let's prepare!

  • convert callback APIs into awaitable functions (promisify);
  • await multiple tasks with ability to limit concurrecny;
  • map with async functions.

Though, there are tests and I am reasonably sure stuff works, I wouldn't put this into production without a review. Things are pretty raw and this is mostly trying out new shiny toys, so approach is "make it work first, make it fast/stable later".

Also, there is nothing here you can't achieve with slightly longer code using Promise.all and some array methods (except limit concurrency). So I don't really know how useful this is yet :)

There are a bunch of examples, run them with --harmony flag.

TODOs:

  • filter, reject;
  • probably more stuff?
  • support for iterables (Set, Map, etc.);
  • benchmarks (lol);
  • docs.

FAQs

Package last updated on 10 Feb 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc