subleveldown
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "subleveldown", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "sublevels implemented using leveldowns", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,5 +5,6 @@ var util = require('util') | ||
var concat = function(prefix, key) { | ||
if (typeof key === 'string' && key.length) return prefix+key | ||
if (Buffer.isBuffer(key) && key.length) return Buffer.concat([new Buffer(prefix), key]) | ||
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]) | ||
return key | ||
@@ -46,6 +47,6 @@ } | ||
gt: function(x) { | ||
return concat(self.prefix, (x || '')) | ||
return concat(self.prefix, x || '', 1) | ||
}, | ||
lt: function(x) { | ||
return concat(self.prefix, (x || '\xff')) | ||
return concat(self.prefix, x || '\xff', 1) | ||
} | ||
@@ -52,0 +53,0 @@ } |
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
11092
232