New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bson-objectid

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bson-objectid - npm Package Compare versions

Comparing version 1.2.5 to 1.3.0

2

objectid.js

@@ -98,3 +98,3 @@

ObjectID.isValid = function(objectid) {
if(!objectid) return false;
if(!objectid || (typeof objectid !== 'string' && (typeof objectid !== 'object' || typeof objectid.toString !== 'function'))) return false;

@@ -101,0 +101,0 @@ //call .toString() to get the hex if we're

{
"name": "bson-objectid",
"version": "1.2.5",
"version": "1.3.0",
"description": "Construct ObjectIDs without the mongodb driver or bson module",

@@ -5,0 +5,0 @@ "main": "objectid.js",

@@ -177,3 +177,9 @@

});
it("should not throw an error for objects without toString", function() {
var obj = Object.create({}, { toString: { value: false, writeable: false } });
obj.toString.should.not.be.ok;
ObjectID.isValid(obj).should.not.be.ok;
});
});
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