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

bsonstream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bsonstream - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

13

index.js

@@ -70,2 +70,3 @@ var util = require('util');

if (buffer[0] == 0) {
buffer = buffer.slice(1);
this._finishObject();

@@ -133,5 +134,2 @@ } else {

if (buffer.length > 3) {
console.log({
d: buffer.toString('hex')
});
this._currentDocument.value = buffer.readInt32LE(0);

@@ -155,2 +153,5 @@ buffer = buffer.slice(4);

break;
default:
throw new Error("BSON Stream: type #" + this._currentDocument.type + " not implemented");
cont = false;
}

@@ -188,3 +189,4 @@ break;

var array = new Array(document.children.length);
for (var i = array.length - 1; i >= 0; i--) {
var l = array.length;
for (var i = 0; i < l; i++) {
var child = document.children[i];

@@ -196,3 +198,4 @@ array[child.name] = this._buildValue(child);

var array = {};
for (var i = document.children.length - 1; i >= 0; i--) {
var l = document.children.length;
for (var i = 0; i < l; i++) {
var child = document.children[i];

@@ -199,0 +202,0 @@ array[child.name] = this._buildValue(child);

{
"name": "bsonstream",
"version": "0.1.0",
"version": "0.1.1",
"description": "A BSON parsing stream, will emit all childs of the main list",

@@ -19,3 +19,6 @@ "main": "index.js",

"author": "Corné \"EaterOfCode\" Oppelaar <hello@eaterofco.de>",
"license": "MIT"
"license": "MIT",
"devDependencies": {
"bson": "~0.2.5"
}
}
var BSONStream = require('./index'),
BSON = require("bson"),
testStream = new BSONStream();

@@ -8,2 +9,25 @@ testStream.on("data", function(a) {

console.log("done", a);
});
});
var Pure = (new BSON.pure);
var bin = (new Pure.BSON).serialize({
d: 'Hey',
a: 6.7,
g: 457,
f: {
"dope": "HEALING POWERZ",
strength: null,
nesting: {
nesting: {
nesting: {
}
}
}
},
p: true,
o: false
});
var l = bin.length;
for (var i = 0; i < l; i++) {
testStream.write(bin.slice(i, i + 1));
}
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