@hyperjump/pact
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -5,18 +5,3 @@ const curry = require("just-curry-it"); | ||
module.exports = curry(async (fn, acc, doc) => { | ||
return (await doc).reduce(async (acc, item) => { | ||
let resolvedAcc; | ||
try { | ||
resolvedAcc = await acc; | ||
} catch (e) { | ||
try { | ||
await item; | ||
} catch (e) { | ||
// If we've already encountered an error, ignore subsequent errors. | ||
} | ||
return acc; | ||
} | ||
return fn(resolvedAcc, item); | ||
}, acc); | ||
return (await doc).reduce(async (acc, item) => fn(await acc, item), acc); | ||
}); |
{ | ||
"name": "@hyperjump/pact", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Higher order functions that work with promises", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
14
7038
56