Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
bluebird-settle
Advanced tools
Add the settle method to the bluebird 3.x library.
You're project must already have bluebird installed via npm. This module will not include bluebird for you, but it will add the settle method to any version of bluebird that you are using.
var Promise = require('bluebird-settle');
var promises = [
Promise.resolve(true),
Promise.resolve('Yes'),
Promise.reject(new Error('Foo'))
];
Promise.settle(promises)
.then(function(results) {
results.forEach(function(result) {
if (result.isRejected()) {
console.log('Rejected with reason: ' + result.reason());
} else if (result.isResolved()) {
console.log('Resolved with value: ' + result.value());
}
});
});
/*
Sample Output
Resolved with value: true
Resolved with value: Yes
Rejected with reason: Error: Foo
*/
You only need to require the bluebird-settle
library once. You can require it over and over if you want, but you only have to require it once. For example:
index.js
require('bluebird-settle');
var foo = require('./foo');
...
foo.js
var Promise = require('bluebird');
console.log(typeof Promise.settle === 'function'); // true
...
FAQs
Add the settle method to the bluebird 3.x library.
The npm package bluebird-settle receives a total of 1 weekly downloads. As such, bluebird-settle popularity was classified as not popular.
We found that bluebird-settle 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.