Comparing version 1.0.0 to 1.1.0
16
index.js
@@ -1,15 +0,9 @@ | ||
const reduce = accumulator => async iterable => { | ||
let result = accumulator; | ||
import aiReduce from "ai-reduce"; | ||
for await (const chunk of iterable) { | ||
result = result.concat(chunk); | ||
} | ||
const reducer = (accumulator, item) => accumulator.concat(item); | ||
return result; | ||
}; | ||
const concat = aiReduce.partial(reducer, ""); | ||
concat.obj = aiReduce.partial(reducer, []); | ||
concat.buff = iterable => aiReduce(reducer, [], iterable).then(Buffer.concat); | ||
const concat = reduce(""); | ||
concat.obj = reduce([]); | ||
concat.buff = iterable => concat.obj(iterable).then(Buffer.concat); | ||
export default concat; |
{ | ||
"name": "ai-concat", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Concat an async iterable into a promise", | ||
@@ -33,3 +33,7 @@ "repository": "parro-it/ai-concat", | ||
"tape-async": "^2.3.0" | ||
}, | ||
"dependencies": { | ||
"ai-reduce": "^1.1.0", | ||
"is-async-iterable": "^1.0.0" | ||
} | ||
} |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
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
3266
2
8
1
+ Addedai-reduce@^1.1.0
+ Addedis-async-iterable@^1.0.0
+ Addedai-reduce@1.1.0(transitive)
+ Addedis-async-iterable@1.0.2(transitive)