level-codec
Advanced tools
Comparing version 1.2.1 to 2.0.0
var encodeKey = require('./encode-key'); | ||
var encodeValue = require('./encode-value'); | ||
module.exports = function(ops, batchOptions, dbOptions){ | ||
ops.forEach(function(op){ | ||
op.key = encodeKey(op.key, [op, batchOptions, dbOptions]); | ||
module.exports = function(ops, optionObjects){ | ||
return ops.map(function(_op){ | ||
var localOptionObjects = [_op].concat(optionObjects); | ||
if ('value' in op) { | ||
op.value = encodeValue(op.value, [op, batchOptions, dbOptions]); | ||
var op = { | ||
type: _op.type, | ||
key: encodeKey(_op.key, localOptionObjects) | ||
}; | ||
if ('value' in _op) { | ||
op.value = encodeValue(_op.value, localOptionObjects); | ||
} | ||
delete op.keyEncoding; | ||
delete op.valueEncoding; | ||
delete op.encoding; | ||
return op; | ||
}); | ||
}; | ||
{ | ||
"name": "level-codec", | ||
"repository": "Level/codec", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "Levelup's encoding logic", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -12,3 +12,3 @@ | ||
### .encodeValue(value, optionObjects) | ||
### .encodeBatch(batch, batchOptions, dbOptions) | ||
### .encodeBatch(batch, optionObjects) | ||
### .encodings | ||
@@ -15,0 +15,0 @@ ### .decodeKey(key, optionObjects) |
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
5763
16
172