SILENT KILLERPanel

Current Path: > > lib > node_modules > npm > node_modules > promise-inflight > > >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/node_modules/npm/node_modules/promise-inflight///

NameTypeSizeLast ModifiedActions
LICENSE File 752 bytes March 10 2021 14:36:39.
README.md File 782 bytes March 10 2021 14:36:39.
inflight.js File 842 bytes March 10 2021 14:36:39.
package.json File 1539 bytes March 10 2021 14:36:39.

Reading File: //lib/node_modules/npm/node_modules/promise-inflight////README.md

# promise-inflight

One promise for multiple requests in flight to avoid async duplication

## USAGE

```javascript
const inflight = require('promise-inflight')

// some request that does some stuff
function req(key) {
  // key is any random string.  like a url or filename or whatever.
  return inflight(key, () => {
    // this is where you'd fetch the url or whatever
    return Promise.delay(100)
  })
}

// only assigns a single setTimeout
// when it dings, all thens get called with the same result.  (There's only
// one underlying promise.)
req('foo').then(…)
req('foo').then(…)
req('foo').then(…)
req('foo').then(…)
```

## SEE ALSO

* [inflight](https://npmjs.com/package/inflight) - For the callback based function on which this is based.

## STILL NEEDS

Tests!

SILENT KILLER Tool