🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

mongodb-query-parser

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-query-parser - npm Package Compare versions

Comparing version

to
0.2.1

16

lib/index.js

@@ -23,2 +23,5 @@ const EJSON = require('mongodb-extended-json');

},
ObjectId: function(v) {
return `ObjectId('${v.toHexString()}')`;
},
Binary: function(v) {

@@ -91,7 +94,2 @@ return `Binary('${v.buffer.toString('base64')}', '${v.sub_type.toString(

// TODO Cache parsing.
// const createLRUCache = require('lru-cache');
// const parseProjectCache = createLRUCache({max: 100});
// const parseFilterCache = createLRUCache({max: 100});
function executeJavascript(input, sandbox) {

@@ -133,4 +131,8 @@ sandbox = sandbox || {};

MinKey: bson.MinKey,
ObjectID: bson.ObjectID,
ObjectId: bson.ObjectId,
ObjectID: function(v) {
return new bson.ObjectId(v);
},
ObjectId: function(v) {
return new bson.ObjectId(v);
},
Symbol: bson.Symbol,

@@ -137,0 +139,0 @@ Timestamp: bson.Timestamp,

{
"name": "mongodb-query-parser",
"description": "Parse MongoDB queries",
"version": "0.2.0",
"version": "0.2.1",
"scripts": {

@@ -6,0 +6,0 @@ "fmt": "mongodb-js-fmt",