New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ai-reduce

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-reduce - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

10

index.js

@@ -50,10 +50,14 @@ import isAsyncIterable from "is-async-iterable";

}
const generator = data[Symbol.asyncIterator] || data[Symbol.iterator];
const iterator = generator.call(data);
for await (const item of data) {
let it = await iterator.next();
while (!it.done) {
if (accumulator === Unspecified) {
accumulator = item;
accumulator = it.value;
} else {
accumulator = await reducer(accumulator, item, index, data);
accumulator = await reducer(accumulator, await it.value, index, data);
}
index++;
it = await iterator.next();
}

@@ -60,0 +64,0 @@

{
"name": "ai-reduce",
"version": "2.0.0",
"version": "2.1.0",
"description": "Reduce for async iterables.",

@@ -13,7 +13,7 @@ "repository": "parro-it/ai-reduce",

"scripts": {
"test": "node --harmony_async_iteration -r @std/esm test.js | tap-colorize - && linterjs .",
"test": "node -r @std/esm test.js | tap-colorize - && linterjs .",
"doc": "documentation readme index.js --section=API"
},
"engines": {
"node": ">9"
"node": ">7"
},

@@ -20,0 +20,0 @@ "keywords": [

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