
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
promise-store-js
Advanced tools
Create and handle Promises in a simple manner. Especially useful for TCP based protocol implementations.
const PromiseStore = require("promise-store-js");
const store = new PromiseStore();
store
.create("myPromise")
.then((res) => console.log("myPromise resolved with:", res));
store.resolve(function (el) {
return el.context === "myPromise";
}, "Hello World");
This module is available through the npm registry.
$ npm install promise-store-js
Create an instance to create and handle promises.
The following table describes the properties of the optional options object.
| Property | Description | Type | Default |
|---|---|---|---|
| timeout | Time in milliseconds a promise times out | Number | 6000 |
This creates a Promise and returns it.
The context argument can be of any type and is ment to be used for filtering.
Resolve one or more Promises previously created.
The filter argument has to be a function or RegExp. In case of a function it should return a truthy to resolve the matching Promise, and a falsy value otherwise.
function (el) { return el.context === 'foo' }
In case of a RegExp, the .test() method will be called against the context, passed in while creation.
const promise = store.create('foo')
store.resolve(/foo/,'bar')
await promise // Returns 'bar'
The value argument can be of any type and will be the promise result.
Returns the number of Promises currently pending.
https://github.com/cybusio/promise-store-js/tree/main/examples
FAQs
Create and handle Promises in a simple manner
We found that promise-store-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.