Comparing version 0.3.0 to 0.3.1
@@ -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" : [] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
349553