Socket
Book a DemoInstallSign in
Socket

p-settle

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-settle

Settle promises concurrently and get their fulfillment value or rejection reason with optional limited concurrency

latest
Source
npmnpm
Version
5.2.0
Version published
Maintainers
1
Created

What is p-settle?

The p-settle npm package is used to settle multiple promises and get their results regardless of whether they were fulfilled or rejected. It returns an array of objects with the state and value/reason of each promise.

What are p-settle's main functionalities?

Settling multiple promises

This feature allows you to settle multiple promises and get their results regardless of whether they were fulfilled or rejected. The output is an array of objects with the status and value/reason of each promise.

const pSettle = require('p-settle');

const promises = [
  Promise.resolve('Success'),
  Promise.reject(new Error('Failure')),
  Promise.resolve('Another success')
];

pSettle(promises).then(results => {
  console.log(results);
  /*
  Output:
  [
    { status: 'fulfilled', value: 'Success' },
    { status: 'rejected', reason: Error: Failure },
    { status: 'fulfilled', value: 'Another success' }
  ]
  */
});

Other packages similar to p-settle

Keywords

promise

FAQs

Package last updated on 10 Sep 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.