Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bson

Package Overview
Dependencies
Maintainers
2
Versions
163
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.21 to 0.4.22

5

lib/bson/binary.js

@@ -5,3 +5,6 @@ /**

*/
if(typeof window === 'undefined') {
// Test if we're in Node via presence of "global" not absence of "window"
// to support hybrid environments like Electron
if(typeof global !== 'undefined') {
var Buffer = require('buffer').Buffer; // TODO just use global Buffer

@@ -8,0 +11,0 @@ }

3

lib/bson/objectid.js

@@ -254,2 +254,5 @@ /**

}
if(id instanceof ObjectID) {
return true;
}
return false;

@@ -256,0 +259,0 @@ };

@@ -21,3 +21,3 @@ "use strict"

// Read the document size
var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
var size = buffer[index] | buffer[index+1] << 8 | buffer[index+2] << 16 | buffer[index+3] << 24;

@@ -30,3 +30,3 @@ // Ensure buffer is valid size

// Illegal end value
if(buffer[size - 1] != 0) {
if(buffer[index + size - 1] != 0) {
throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");

@@ -36,3 +36,3 @@ }

// Start deserializtion
return deserializeObject(buffer, index - 4, options, isArray);
return deserializeObject(buffer, index, options, isArray);
}

@@ -398,2 +398,8 @@

/**
* Binary BSON Type
*
* @classconstant BSON_DATA_UNDEFINED
**/
BSON.BSON_DATA_UNDEFINED = 7;
/**
* ObjectID BSON Type

@@ -400,0 +406,0 @@ *

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

@@ -6,0 +6,0 @@ , "contributors" : []

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