@magnetarjs/core
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -171,5 +171,3 @@ 'use strict'; | ||
for (const fn of fns) { | ||
const result = fn(payload, ...otherArgs); | ||
if (result) | ||
payload = result; | ||
payload = fn(payload, ...otherArgs); | ||
} | ||
@@ -176,0 +174,0 @@ return payload; |
@@ -167,5 +167,3 @@ import { mergeAndConcat, merge } from 'merge-anything'; | ||
for (const fn of fns) { | ||
const result = fn(payload, ...otherArgs); | ||
if (result) | ||
payload = result; | ||
payload = fn(payload, ...otherArgs); | ||
} | ||
@@ -172,0 +170,0 @@ return payload; |
{ | ||
"name": "@magnetarjs/core", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"sideEffects": false, | ||
@@ -69,3 +69,3 @@ "description": "Magnetar core library.", | ||
}, | ||
"gitHead": "070cf44ea57eb0581d5a90431cd354ec310ba4fa" | ||
"gitHead": "74d53eacf54c3892f873b23ba4231fe7b821ea47" | ||
} |
@@ -11,3 +11,3 @@ type AnyFunction = (...args: any[]) => any | ||
*/ | ||
export function executeOnFns<Payload extends any> ( | ||
export function executeOnFns<Payload extends any>( | ||
fns: AnyFunction[], | ||
@@ -18,6 +18,5 @@ payload: Payload, | ||
for (const fn of fns) { | ||
const result = fn(payload, ...otherArgs) | ||
if (result) payload = result | ||
payload = fn(payload, ...otherArgs) | ||
} | ||
return payload | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
242301
5467