Comparing version 1.1.0 to 1.2.0
@@ -1,9 +0,9 @@ | ||
import aiReduce from "ai-reduce"; | ||
import reduce from "ai-reduce"; | ||
const reducer = (accumulator, item) => accumulator.concat(item); | ||
const concat = aiReduce.partial(reducer, ""); | ||
concat.obj = aiReduce.partial(reducer, []); | ||
concat.buff = iterable => aiReduce(reducer, [], iterable).then(Buffer.concat); | ||
const concat = reduce.with(reducer, ""); | ||
concat.obj = reduce.with(reducer, []); | ||
concat.buff = iterable => reduce(iterable, reducer, []).then(Buffer.concat); | ||
export default concat; |
{ | ||
"name": "ai-concat", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Concat an async iterable into a promise", | ||
@@ -19,4 +19,22 @@ "repository": "parro-it/ai-concat", | ||
}, | ||
"keywords": [], | ||
"tonicExampleFilename": "example.js", | ||
"keywords": [ | ||
"ai-fun", | ||
"ai", | ||
"promise", | ||
"concat", | ||
"collection", | ||
"list", | ||
"array", | ||
"iterable", | ||
"async-iterator", | ||
"async-iterable", | ||
"asynciterator", | ||
"asynciterable", | ||
"iterator", | ||
"async", | ||
"await", | ||
"functional", | ||
"functions", | ||
"stream" | ||
], | ||
"@std/esm": { | ||
@@ -36,5 +54,5 @@ "esm": "js", | ||
"dependencies": { | ||
"ai-reduce": "^1.1.0", | ||
"ai-reduce": "^2.0.0", | ||
"is-async-iterable": "^1.0.0" | ||
} | ||
} |
@@ -10,4 +10,5 @@ # ai-concat | ||
## Async iterable fun | ||
__This module is part of [Async iterable fun](https://github.com/parro-it/ai-fun), a complete toolset of modules to work with async iterables.__ | ||
> **_This module is part of | ||
> [Async iterable fun](https://github.com/parro-it/ai-fun), a complete toolset | ||
> of modules to work with async iterables._** | ||
@@ -19,5 +20,5 @@ ## Usage | ||
```js | ||
const aiConcat = require('ai-concat'); | ||
const aiConcat = require("ai-concat"); | ||
console.log({aiConcat}); | ||
console.log({ aiConcat }); | ||
``` | ||
@@ -28,2 +29,3 @@ | ||
``` | ||
``` | ||
@@ -43,9 +45,7 @@ | ||
- [`noffle/common-readme`](https://github.com/noffle/common-readme) | ||
- [`parro-it/ai-fun`](https://github.com/parro-it/ai-fun) | ||
* [`noffle/common-readme`](https://github.com/noffle/common-readme) | ||
* [`parro-it/ai-fun`](https://github.com/parro-it/ai-fun) | ||
## License | ||
MIT | ||
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
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
3423
4
6
+ Addedai-reduce@2.1.0(transitive)
- Removedai-reduce@1.1.0(transitive)
Updatedai-reduce@^2.0.0