ejson-shell-parser
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -184,5 +184,17 @@ 'use strict'; | ||
Int64: NumberLong, | ||
Map: function Map(arr) { | ||
return new bson__namespace.Map(arr); | ||
}, | ||
Map: function (_Map) { | ||
function Map(_x) { | ||
return _Map.apply(this, arguments); | ||
} | ||
Map.toString = function () { | ||
return _Map.toString(); | ||
}; | ||
return Map; | ||
}(function (arr) { | ||
var _Map2; | ||
return new ((_Map2 = bson__namespace.Map) !== null && _Map2 !== void 0 ? _Map2 : Map)(arr); | ||
}), | ||
MaxKey: function MaxKey() { | ||
@@ -195,6 +207,6 @@ return new bson__namespace.MaxKey(); | ||
ObjectID: function ObjectID(i) { | ||
return new bson__namespace.ObjectID(i); | ||
return new bson__namespace.ObjectId(i); | ||
}, | ||
ObjectId: function ObjectId(i) { | ||
return new bson__namespace.ObjectID(i); | ||
return new bson__namespace.ObjectId(i); | ||
}, | ||
@@ -205,3 +217,3 @@ Symbol: function Symbol(i) { | ||
Timestamp: function Timestamp(low, high) { | ||
if (typeof low === 'number' && typeof high === 'number') { | ||
if (typeof low === 'number' && typeof high === 'number' || high !== undefined) { | ||
// https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps | ||
@@ -215,3 +227,3 @@ // reverse the order to match the legacy shell | ||
return new bson__namespace.Timestamp(low, high); | ||
return new bson__namespace.Timestamp(low); | ||
}, | ||
@@ -218,0 +230,0 @@ ISODate: function ISODate() { |
@@ -184,5 +184,17 @@ 'use strict'; | ||
Int64: NumberLong, | ||
Map: function Map(arr) { | ||
return new bson__namespace.Map(arr); | ||
}, | ||
Map: function (_Map) { | ||
function Map(_x) { | ||
return _Map.apply(this, arguments); | ||
} | ||
Map.toString = function () { | ||
return _Map.toString(); | ||
}; | ||
return Map; | ||
}(function (arr) { | ||
var _Map2; | ||
return new ((_Map2 = bson__namespace.Map) !== null && _Map2 !== void 0 ? _Map2 : Map)(arr); | ||
}), | ||
MaxKey: function MaxKey() { | ||
@@ -195,6 +207,6 @@ return new bson__namespace.MaxKey(); | ||
ObjectID: function ObjectID(i) { | ||
return new bson__namespace.ObjectID(i); | ||
return new bson__namespace.ObjectId(i); | ||
}, | ||
ObjectId: function ObjectId(i) { | ||
return new bson__namespace.ObjectID(i); | ||
return new bson__namespace.ObjectId(i); | ||
}, | ||
@@ -205,3 +217,3 @@ Symbol: function Symbol(i) { | ||
Timestamp: function Timestamp(low, high) { | ||
if (typeof low === 'number' && typeof high === 'number') { | ||
if (typeof low === 'number' && typeof high === 'number' || high !== undefined) { | ||
// https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps | ||
@@ -215,3 +227,3 @@ // reverse the order to match the legacy shell | ||
return new bson__namespace.Timestamp(low, high); | ||
return new bson__namespace.Timestamp(low); | ||
}, | ||
@@ -218,0 +230,0 @@ ISODate: function ISODate() { |
@@ -160,5 +160,17 @@ import { parse as parse$1 } from 'acorn'; | ||
Int64: NumberLong, | ||
Map: function Map(arr) { | ||
return new bson.Map(arr); | ||
}, | ||
Map: function (_Map) { | ||
function Map(_x) { | ||
return _Map.apply(this, arguments); | ||
} | ||
Map.toString = function () { | ||
return _Map.toString(); | ||
}; | ||
return Map; | ||
}(function (arr) { | ||
var _Map2; | ||
return new ((_Map2 = bson.Map) !== null && _Map2 !== void 0 ? _Map2 : Map)(arr); | ||
}), | ||
MaxKey: function MaxKey() { | ||
@@ -171,6 +183,6 @@ return new bson.MaxKey(); | ||
ObjectID: function ObjectID(i) { | ||
return new bson.ObjectID(i); | ||
return new bson.ObjectId(i); | ||
}, | ||
ObjectId: function ObjectId(i) { | ||
return new bson.ObjectID(i); | ||
return new bson.ObjectId(i); | ||
}, | ||
@@ -181,3 +193,3 @@ Symbol: function Symbol(i) { | ||
Timestamp: function Timestamp(low, high) { | ||
if (typeof low === 'number' && typeof high === 'number') { | ||
if (typeof low === 'number' && typeof high === 'number' || high !== undefined) { | ||
// https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps | ||
@@ -191,3 +203,3 @@ // reverse the order to match the legacy shell | ||
return new bson.Timestamp(low, high); | ||
return new bson.Timestamp(low); | ||
}, | ||
@@ -194,0 +206,0 @@ ISODate: function ISODate() { |
{ | ||
"name": "ejson-shell-parser", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"main": "dist/ejson-shell-parser.cjs.js", | ||
@@ -26,3 +26,3 @@ "module": "dist/ejson-shell-parser.esm.js", | ||
"peerDependencies": { | ||
"bson": "^4.2.3" | ||
"bson": "^4.2.3 || ^5.0.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
548342
2379