Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

race-as-promised

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

race-as-promised

Alternate Promise.race() implementation which doesn't leak memory, courtesy Brian Kim (https://github.com/brainkim)

    0.0.1latest
    GitHub

Version published
Maintainers
1
Weekly downloads
1,102
increased by19.78%

Weekly downloads

Readme

Source

race-as-promised

This module implements Promise.race() in a way that does not leak memory.

Rationale

The V8 Promise implementation does leak memory in many common Promise.race([...]) call cases; see e.g. https://github.com/nodejs/node/issues/17469.

The V8 Promise implementation is likely not going to be fixed.

See also: https://bugs.chromium.org/p/v8/issues/detail?id=9858

Installation

npm install race-as-promised

Usage

const race = require ("race-as-promised"); // Use race([...]) instead of Promise.race([...])

Author

The source code and test core have been made available under The Unlicense by Brian Kim, to whom we owe our gratitude.

License

The Unlicense

Keywords

FAQs

Last updated on 30 Nov 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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