level-sublevel
Advanced tools
Comparing version 6.3.1 to 6.3.2
23
nut.js
@@ -37,2 +37,12 @@ var hooks = require('./hooks') | ||
function addEncodings(op, prefix) { | ||
if(prefix && prefix.options) { | ||
op.keyEncoding = | ||
op.keyEncoding || prefix.options.keyEncoding | ||
op.valueEncoding = | ||
op.valueEncoding || prefix.options.valueEncoding | ||
} | ||
return op | ||
} | ||
function start () { | ||
@@ -58,8 +68,9 @@ ready = true | ||
var op = ops[i] | ||
addEncodings(op, op.prefix) | ||
op.prefix = getPrefix(op.prefix) | ||
prehooks.trigger([op.prefix, op.key], [op, add, ops]) | ||
function add(ch) { | ||
if(ch === false) return delete ops[i] | ||
ops.push(ch) | ||
function add(op) { | ||
if(op === false) return delete ops[i] | ||
ops.push(op) | ||
} | ||
@@ -81,3 +92,7 @@ } | ||
op.type !== 'del' | ||
? codec.encodeValue(op.value, opts, op) | ||
? codec.encodeValue( | ||
op.value, | ||
opts, | ||
op | ||
) | ||
: undefined, | ||
@@ -84,0 +99,0 @@ type: |
{ | ||
"name": "level-sublevel", | ||
"description": "partition levelup databases", | ||
"version": "6.3.1", | ||
"version": "6.3.2", | ||
"homepage": "https://github.com/dominictarr/level-sublevel", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -23,2 +23,3 @@ var EventEmitter = require('events').EventEmitter | ||
emitter.sublevels = {} | ||
emitter.options = options | ||
@@ -25,0 +26,0 @@ emitter.version = version |
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
74808
2245