Socket
Socket
Sign inDemoInstall

bson

Package Overview
Dependencies
Maintainers
2
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 0.4.22 to 0.4.23

7

lib/bson/objectid.js

@@ -30,3 +30,4 @@ /**

if(!(this instanceof ObjectID)) return new ObjectID(id);
if((id instanceof ObjectID)) return id;
// Duck-typing to support ObjectId from different npm packages
if((id instanceof ObjectID) || (id && id.toHexString)) return id;

@@ -258,2 +259,6 @@ this._bsontype = 'ObjectID';

}
// Duck-Typing detection of ObjectId like objects
if(id.toHexString) {
return id.id.length == 12 || (id.id.length == 24 && checkForHexRegExp.test(id.id));
}
return false;

@@ -260,0 +265,0 @@ };

3

package.json
{ "name" : "bson"
, "description" : "A bson parser for node.js and the browser"
, "keywords" : ["mongodb", "bson", "parser"]
, "version" : "0.4.22"
, "version" : "0.4.23"
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>"

@@ -15,3 +15,2 @@ , "contributors" : []

, "gleak": "0.2.3"
, "one": "2.X.X"
, "benchmark": "1.0.0"

@@ -18,0 +17,0 @@ , "colors": "1.1.0"

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