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

ai-concat

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai-concat - npm Package Compare versions

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"
}
}
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