Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appolo-utils

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appolo-utils - npm Package Compare versions

Comparing version 0.0.59 to 0.0.60

14

lib/promises/promises.js

@@ -57,2 +57,16 @@ "use strict";

}
static async allSettledSpread(promises) {
let fulfilled = [], rejected = [];
let results = await Promises.allSettled(promises);
for (let i = 0; i < results.length; i++) {
let item = results[i];
if (item.status == "fulfilled") {
fulfilled.push(item.value);
}
else {
rejected.push(item.reason);
}
}
return [fulfilled, rejected];
}
static some(promises, opts = {}) {

@@ -59,0 +73,0 @@ return promiseSome_1.PromiseSome.some(promises, opts);

@@ -72,2 +72,19 @@ import {Deferred} from "./deferred";

public static async allSettledSpread<T>(promises: Promise<T>[]): Promise<([T[], any[]])> {
let fulfilled: T[] = [], rejected: any[] = [];
let results = await Promises.allSettled(promises);
for (let i = 0; i < results.length; i++) {
let item = results[i];
if (item.status == "fulfilled") {
fulfilled.push(item.value)
} else {
rejected.push(item.reason)
}
}
return [fulfilled, rejected]
}
public static some<T>(promises: Promise<T>[], opts: { counter?: number } = {}): Promise<({ status: "fulfilled"; value: T; } | { status: "rejected"; reason: any; })[]> {

@@ -74,0 +91,0 @@

2

package.json

@@ -17,3 +17,3 @@ {

"main": "./index.js",
"version": "0.0.59",
"version": "0.0.60",
"license": "MIT",

@@ -20,0 +20,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc