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/bower.json
CHANGED
package/bson.d.ts
CHANGED
|
@@ -875,7 +875,7 @@ export declare interface MinKeyExtended {
|
|
|
875
875
|
* @public
|
|
876
876
|
*/
|
|
877
877
|
declare class ObjectId {
|
|
878
|
-
_bsontype: '
|
|
878
|
+
_bsontype: 'ObjectID';
|
|
879
879
|
/* Excluded from this release type: index */
|
|
880
880
|
static cacheHexString: boolean;
|
|
881
881
|
/* Excluded from this release type: [kId] */
|
package/dist/bson.browser.esm.js
CHANGED
|
@@ -4593,7 +4593,7 @@ var ObjectId = /** @class */ (function () {
|
|
|
4593
4593
|
this[kId] = buffer_1.from(workingId, 'hex');
|
|
4594
4594
|
}
|
|
4595
4595
|
else {
|
|
4596
|
-
throw new BSONTypeError('Argument passed in must be a string of 12 bytes or a string of 24 hex characters');
|
|
4596
|
+
throw new BSONTypeError('Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer');
|
|
4597
4597
|
}
|
|
4598
4598
|
}
|
|
4599
4599
|
else {
|
|
@@ -4710,7 +4710,7 @@ var ObjectId = /** @class */ (function () {
|
|
|
4710
4710
|
return false;
|
|
4711
4711
|
}
|
|
4712
4712
|
if (otherId instanceof ObjectId) {
|
|
4713
|
-
return this
|
|
4713
|
+
return this[kId][11] === otherId[kId][11] && this[kId].equals(otherId[kId]);
|
|
4714
4714
|
}
|
|
4715
4715
|
if (typeof otherId === 'string' &&
|
|
4716
4716
|
ObjectId.isValid(otherId) &&
|
|
@@ -4727,7 +4727,9 @@ var ObjectId = /** @class */ (function () {
|
|
|
4727
4727
|
if (typeof otherId === 'object' &&
|
|
4728
4728
|
'toHexString' in otherId &&
|
|
4729
4729
|
typeof otherId.toHexString === 'function') {
|
|
4730
|
-
|
|
4730
|
+
var otherIdString = otherId.toHexString();
|
|
4731
|
+
var thisIdString = this.toHexString().toLowerCase();
|
|
4732
|
+
return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
|
|
4731
4733
|
}
|
|
4732
4734
|
return false;
|
|
4733
4735
|
};
|