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

@naturalcycles/js-lib

Package Overview
Dependencies
Maintainers
3
Versions
525
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/js-lib - npm Package Compare versions

Comparing version 8.7.1 to 8.8.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [8.8.0](https://github.com/NaturalCycles/js-lib/compare/v8.7.1...v8.8.0) (2019-10-19)
### Features
* pMap skipErrors option ([4121a4c](https://github.com/NaturalCycles/js-lib/commit/4121a4c))
## [8.7.1](https://github.com/NaturalCycles/js-lib/compare/v8.7.0...v8.7.1) (2019-09-20)

@@ -2,0 +9,0 @@

6

dist-esm/promise/pMap.js

@@ -55,3 +55,3 @@ /*

}
const { concurrency, stopOnError } = options;
const { concurrency, stopOnError, skipErrors } = options;
if (!(typeof concurrency === 'number' && concurrency >= 1)) {

@@ -77,3 +77,3 @@ throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`);

if (resolvingCount === 0) {
if (!stopOnError && errors.length) {
if (!stopOnError && !skipErrors && errors.length) {
reject(new AggregatedError(errors, ret));

@@ -95,3 +95,3 @@ }

}, error => {
if (stopOnError) {
if (stopOnError && !skipErrors) {
isRejected = true;

@@ -98,0 +98,0 @@ reject(error);

@@ -14,2 +14,7 @@ export interface PMapOptions {

stopOnError?: boolean;
/**
* If true - will ignore errors and return results from successful operations.
* @default false
*/
skipErrors?: boolean;
}

@@ -16,0 +21,0 @@ /**

@@ -57,3 +57,3 @@ "use strict";

}
const { concurrency, stopOnError } = options;
const { concurrency, stopOnError, skipErrors } = options;
if (!(typeof concurrency === 'number' && concurrency >= 1)) {

@@ -79,3 +79,3 @@ throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`);

if (resolvingCount === 0) {
if (!stopOnError && errors.length) {
if (!stopOnError && !skipErrors && errors.length) {
reject(new aggregatedError_1.AggregatedError(errors, ret));

@@ -97,3 +97,3 @@ }

}, error => {
if (stopOnError) {
if (stopOnError && !skipErrors) {
isRejected = true;

@@ -100,0 +100,0 @@ reject(error);

{
"name": "@naturalcycles/js-lib",
"version": "8.7.1",
"version": "8.8.0",
"scripts": {

@@ -5,0 +5,0 @@ "build": "del ./dist && tsc",

@@ -26,2 +26,8 @@ /*

stopOnError?: boolean
/**
* If true - will ignore errors and return results from successful operations.
* @default false
*/
skipErrors?: boolean
}

@@ -81,3 +87,3 @@

const { concurrency, stopOnError } = options
const { concurrency, stopOnError, skipErrors } = options

@@ -111,3 +117,3 @@ if (!(typeof concurrency === 'number' && concurrency >= 1)) {

if (resolvingCount === 0) {
if (!stopOnError && errors.length) {
if (!stopOnError && !skipErrors && errors.length) {
reject(new AggregatedError(errors, ret))

@@ -133,3 +139,3 @@ } else {

error => {
if (stopOnError) {
if (stopOnError && !skipErrors) {
isRejected = true

@@ -136,0 +142,0 @@ reject(error)

Sorry, the diff of this file is not supported yet

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