Socket
Socket
Sign inDemoInstall

subleveldown

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

subleveldown - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "subleveldown",
"version": "1.0.5",
"version": "1.0.6",
"description": "sublevels implemented using leveldowns",

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

@@ -5,6 +5,7 @@ var util = require('util')

var concat = function(prefix, key, len) {
if (!len) len = key.length
if (typeof key === 'string' && len) return prefix+key
if (Buffer.isBuffer(key) && len) return Buffer.concat([new Buffer(prefix), key])
var END = new Buffer([0xff])
var concat = function(prefix, key, force) {
if (typeof key === 'string' && (force || key.length)) return prefix+key
if (Buffer.isBuffer(key) && (force || key.length)) return Buffer.concat([new Buffer(prefix), key])
return key

@@ -47,6 +48,7 @@ }

gt: function(x) {
return concat(self.prefix, x || '', 1)
return concat(self.prefix, x || '', true)
},
lt: function(x) {
return concat(self.prefix, x || '\xff', 1)
if (Buffer.isBuffer(x) && !x.length) x = END
return concat(self.prefix, x || '\xff')
}

@@ -53,0 +55,0 @@ }

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