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

bsonview

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bsonview - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

15

index.js

@@ -52,6 +52,11 @@ const {

class BSONView extends ObjectView {
toBSON() {
return this.constructor.toBSON(this);
getBSON(field) {
const { View, start, length } = this.constructor.layout[field];
return View.toBSON(this, start, length);
}
toBSON(fields) {
return this.constructor.toBSON(this, 0, 0, fields);
}
static from(object, view, start, length) {

@@ -208,4 +213,4 @@ if (object && object instanceof Uint8Array) return this.fromBSON(object, view, start, length);

static toBSON(view, start = 0) {
const { fields, layout } = this;
static toBSON(view, start = 0, length, fields = this.fields) {
const { layout } = this;
const result = {};

@@ -220,3 +225,3 @@ for (let i = 0; i < fields.length; i++) {

static Array() {
static get Array() {
return ArrayViewMixin(this);

@@ -223,0 +228,0 @@ }

{
"name": "bsonview",
"version": "0.6.1",
"version": "0.7.0",
"description": "Schema-based BSON using structurae's ObjectView binary protocol.",

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

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