Socket
Socket
Sign inDemoInstall

level-codec

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-codec - npm Package Compare versions

Comparing version 1.2.1 to 2.0.0

test/batch.js

19

lib/batch.js
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)

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