Socket
Socket
Sign inDemoInstall

bson

Package Overview
Dependencies
Maintainers
6
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bson - npm Package Compare versions

Comparing version 4.6.1 to 4.6.2

2

bower.json

@@ -25,3 +25,3 @@ {

],
"version": "4.6.1"
"version": "4.6.2"
}

@@ -878,3 +878,3 @@ import { Buffer } from 'buffer';

declare class ObjectId {
_bsontype: 'ObjectId';
_bsontype: 'ObjectID';
/* Excluded from this release type: index */

@@ -881,0 +881,0 @@ static cacheHexString: boolean;

@@ -65,3 +65,3 @@ "use strict";

else {
throw new error_1.BSONTypeError('Argument passed in must be a string of 12 bytes or a string of 24 hex characters');
throw new error_1.BSONTypeError('Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer');
}

@@ -183,3 +183,3 @@ }

if (otherId instanceof ObjectId) {
return this.toString() === otherId.toString();
return this[kId][11] === otherId[kId][11] && this[kId].equals(otherId[kId]);
}

@@ -201,3 +201,5 @@ if (typeof otherId === 'string' &&

typeof otherId.toHexString === 'function') {
return otherId.toHexString() === this.toHexString();
var otherIdString = otherId.toHexString();
var thisIdString = this.toHexString().toLowerCase();
return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
}

@@ -204,0 +206,0 @@ return false;

@@ -18,3 +18,3 @@ {

"types": "bson.d.ts",
"version": "4.6.1",
"version": "4.6.2",
"author": {

@@ -21,0 +21,0 @@ "name": "The MongoDB NodeJS Team",

@@ -31,3 +31,3 @@ import { Buffer } from 'buffer';

export class ObjectId {
_bsontype!: 'ObjectId';
_bsontype!: 'ObjectID';

@@ -88,3 +88,3 @@ /** @internal */

throw new BSONTypeError(
'Argument passed in must be a string of 12 bytes or a string of 24 hex characters'
'Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer'
);

@@ -217,3 +217,3 @@ }

if (otherId instanceof ObjectId) {
return this.toString() === otherId.toString();
return this[kId][11] === otherId[kId][11] && this[kId].equals(otherId[kId]);
}

@@ -243,3 +243,5 @@

) {
return otherId.toHexString() === this.toHexString();
const otherIdString = otherId.toHexString();
const thisIdString = this.toHexString().toLowerCase();
return typeof otherIdString === 'string' && otherIdString.toLowerCase() === thisIdString;
}

@@ -246,0 +248,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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