Socket
Socket
Sign inDemoInstall

level-blobs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-blobs - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

19

index.js

@@ -7,2 +7,12 @@ var Writable = require('readable-stream/writable');

var EMPTY = new Buffer(0);
var ENCODER = {
encode: function(data) {
return typeof data === 'string' ? data = new Buffer(data) : data;
},
decode: function(data) {
return Buffer.isBuffer(data) ? data : new Buffer(data);
},
buffer: true,
type: 'raw'
};

@@ -55,3 +65,3 @@ var noop = function() {};

db.get(key, {valueEncoding:'binary'}, function(err, block) {
db.get(key, {valueEncoding:ENCODER}, function(err, block) {
if (err && !err.notFound) return cb(err);

@@ -137,3 +147,4 @@ if (!reservations[key]) reservations[key] = {locks:0, block:block};

key: key,
value: block
value: block,
valueEncoding: ENCODER
});

@@ -239,3 +250,3 @@

lt: name+'\xff\xff',
valueEncoding: 'binary'
valueEncoding: ENCODER
});

@@ -340,3 +351,3 @@

if (!latest) return cb(null, 0);
db.get(latest, {valueEncoding:'binary'}, function(err, val) {
db.get(latest, {valueEncoding:ENCODER}, function(err, val) {
if (err && err.notFound) return cb(null, 0);

@@ -343,0 +354,0 @@ if (err) return cb(err);

{
"name": "level-blobs",
"version": "0.1.1",
"version": "0.1.2",
"description": "Save binary blobs in level and stream then back",

@@ -5,0 +5,0 @@ "repository": "git://github.com/mafintosh/level-blobs.git",

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