Socket
Socket
Sign inDemoInstall

cosa

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cosa - npm Package Compare versions

Comparing version 3.0.12 to 3.0.13

16

lib/cursor.js

@@ -39,5 +39,17 @@ const { times } = require('omnibelt');

if (!maxParallel || maxParallel < 1) { maxParallel = 1; }
let cursorExhausted = false;
const getNext = async () => {
if (cursorExhausted) { return; }
if (!await this._cursor.hasNext()) {
cursorExhausted = true;
return;
}
return this.next();
};
let nextResourceP = getNext();
const itemWrapper = async () => {
if (this.isClosed()) { return; }
const item = await this.next();
if (cursorExhausted) { return; }
const currentResourceP = nextResourceP;
nextResourceP = nextResourceP.then(getNext);
const item = await currentResourceP;
if (!item) { return; }

@@ -44,0 +56,0 @@ await iterator(item);

2

package.json
{
"name": "cosa",
"version": "3.0.12",
"version": "3.0.13",
"description": "Cosa Models for MongoDB",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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