Socket
Socket
Sign inDemoInstall

race-as-promised

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

types.d.ts

3

package.json
{
"name": "race-as-promised",
"version": "0.0.2",
"version": "0.0.3",
"description": "Alternate Promise.race() implementation which doesn't leak memory, courtesy Brian Kim (https://github.com/brainkim)",
"main": "index.js",
"types": "types.d.ts",
"scripts": {

@@ -7,0 +8,0 @@ "test": "node test.js"

# race-as-promised
This module implements Promise.race() in a way that does not leak
This module implements `Promise.race()` in a way that does not leak
memory.

@@ -9,3 +9,3 @@

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

@@ -20,9 +20,13 @@

npm install race-as-promised
```bash
npm install race-as-promised
```
## Usage
const race = require ("race-as-promised");
```js
const race = require ("race-as-promised");
// Use race([...]) instead of Promise.race([...])
// Use race([...]) instead of Promise.race([...])
```

@@ -29,0 +33,0 @@ ## Author

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