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

mongo-control

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-control - npm Package Compare versions

Comparing version 1.0.68 to 1.0.69

21

mongo.control.js

@@ -477,2 +477,4 @@ var MongoClient = require('mongodb').MongoClient

if (params.query) {

@@ -496,7 +498,20 @@ if (typeof params.query === 'string') {

var query = {
$and: [params.query]
}
if(params.next) {
params.query._id = {$gt: new ObjectID(params.next)}
var nextObj = {$or: [{$gt: params.next}]}
if(reMongoId.test(params.next)) {
nextObj.$or.push({$gt: new ObjectID(params.next)})
}
query.$and.push(nextObj)
params.limit = 1
} else if(params.prev) {
params.query._id = {$lt: new ObjectID(params.prev)}
var prevObj = {$or: [{$lt: params.prev}]}
if(reMongoId.test(params.prev)) {
prevObj.$or.push({$lt: new ObjectID(params.prev)})
}
query.$and.push(prevObj)
params.limit = 1

@@ -523,3 +538,3 @@ params.sortBy = {_id: -1}

db.collection(params.collection).find(params.query, params.projection).sort(params.sortBy).limit(params.limit).toArray(function (e, docs) {
db.collection(params.collection).find(query, params.projection).sort(params.sortBy).limit(params.limit).toArray(function (e, docs) {
if (e) return err(e)

@@ -526,0 +541,0 @@

2

package.json
{
"name": "mongo-control",
"version": "1.0.68",
"version": "1.0.69",
"description": "Simple functions to control mongo",

@@ -5,0 +5,0 @@ "main": "mongo.control.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