
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
promised-map
Advanced tools
A map of promises that can be resolved or rejected by key. Once promise is resolved/rejected, related key/value pair is automatically removed from map.
npm install promised-map
import { PromisedMap } from 'promised-map';
const map = new PromisedMap();
// set key/value pair and retrieve related promise.
const promise = map.set('foo', 42);
// resolve promise later by key
map.resolve('foo', 'bar');
// reject promise by key
map.reject('foo', new Error('error'));
// check if promise is still pending
map.has('foo');
// resolve all promises and clear map
map.resolveAll('bar');
// reject all promises and clear map
map.rejectAll(new Error('error'));
// iterate all promises
map.forEach((value, key) => { /* ... */ });
MIT @ Vitaliy Potapov
FAQs
A map of promises that can be resolved or rejected by key
The npm package promised-map receives a total of 12,758 weekly downloads. As such, promised-map popularity was classified as popular.
We found that promised-map demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.