bson 4.6.1 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bower.json +1 -1
- package/bson.d.ts +1 -1
- package/dist/bson.browser.esm.js +5 -3
- package/dist/bson.browser.esm.js.map +1 -1
- package/dist/bson.browser.umd.js +5 -3
- package/dist/bson.browser.umd.js.map +1 -1
- package/dist/bson.bundle.js +5 -3
- package/dist/bson.bundle.js.map +1 -1
- package/dist/bson.esm.js +5 -3
- package/dist/bson.esm.js.map +1 -1
- package/lib/objectid.js +5 -3
- package/lib/objectid.js.map +1 -1
- package/package.json +1 -1
- package/src/objectid.ts +6 -4
package/dist/bson.bundle.js
CHANGED
|
@@ -4596,7 +4596,7 @@ var BSON = (function (exports) {
|
|
|
4596
4596
|
this[kId] = buffer_1.from(workingId, 'hex');
|
|
4597
4597
|
}
|
|
4598
4598
|
else {
|
|
4599
|
-
throw new BSONTypeError('Argument passed in must be a string of 12 bytes or a string of 24 hex characters');
|
|
4599
|
+
throw new BSONTypeError('Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer');
|
|
4600
4600
|
}
|
|
4601
4601
|
}
|
|
4602
4602
|
else {
|
|
@@ -4713,7 +4713,7 @@ var BSON = (function (exports) {
|
|
|
4713
4713
|
return false;
|
|
4714
4714
|
}
|
|
4715
4715
|
if (otherId instanceof ObjectId) {
|
|
4716
|
-
return this
|
|
4716
|
+
return this[kId][11] === otherId[kId][11] && this[kId].equals(otherId[kId]);
|
|
4717
4717
|
}
|
|
4718
4718
|
if (typeof otherId === 'string' &&
|
|
4719
4719
|
ObjectId.isValid(otherId) &&
|
|
@@ -4730,7 +4730,9 @@ var BSON = (function (exports) {
|
|
|
4730
4730
|
if (typeof otherId === 'object' &&
|
|
4731
4731
|
'toHexString' in otherId &&
|
|
4732
4732
|
typeof otherId.toHexString === 'function') {
|
|
4733
|
-
|
|
4733
|
+
var otherIdString = otherId.toHexString();
|
|
4734
|
+
var thisIdString = this.toHexString().toLowerCase();
|
|
4735
|
+
return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
|
|
4734
4736
|
}
|
|
4735
4737
|
return false;
|
|
4736
4738
|
};
|