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.3.0 to 0.3.1

34

lib/bson/index.js

@@ -25,4 +25,4 @@ try {

// Exports all the classes for the NATIVE JS BSON Parser
exports.native = function() {
// Exports all the classes for the PURE JS BSON Parser
exports.pure = function() {
var classes = {};

@@ -41,3 +41,3 @@ // Map all the classes

, './long'
].forEach(function (path) {
, '././bson'].forEach(function (path) {
var module = require('./' + path);

@@ -48,10 +48,2 @@ for (var i in module) {

});
// Catch error and return no classes found
try {
classes['BSON'] = require('bson-ext')
} catch(err) {
return {};
}
// Return classes list

@@ -61,4 +53,4 @@ return classes;

// Exports all the classes for the PURE JS BSON Parser
exports.pure = function() {
// Exports all the classes for the NATIVE JS BSON Parser
exports.native = function() {
var classes = {};

@@ -77,10 +69,18 @@ // Map all the classes

, './long'
, '././bson'].forEach(function (path) {
var module = require('./' + path);
for (var i in module) {
classes[i] = module[i];
].forEach(function (path) {
var module = require('./' + path);
for (var i in module) {
classes[i] = module[i];
}
});
// Catch error and return no classes found
try {
classes['BSON'] = require('bson-ext')
} catch(err) {
return exports.pure();
}
// Return classes list
return classes;
}
{ "name" : "bson"
, "description" : "A bson parser for node.js and the browser"
, "keywords" : ["mongodb", "bson", "parser"]
, "version" : "0.3.0"
, "version" : "0.3.1"
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>"

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

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