Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

level-codec

Package Overview
Dependencies
Maintainers
2
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 5.3.0 to 5.4.0

lib/decoder.js

4

index.js

@@ -64,3 +64,3 @@ var encodings = require('./lib/encodings');

Codec.prototype.encodeLtgt = function(ltgt, opts){
Codec.prototype.encodeLtgt = function(ltgt){
var self = this;

@@ -70,3 +70,3 @@ var ret = {};

ret[key] = ltgtKeys.indexOf(key) > -1
? self.encodeKey(ltgt[key], opts)
? self.encodeKey(ltgt[key], ltgt)
: ltgt[key]

@@ -73,0 +73,0 @@ });

{
"name": "level-codec",
"repository": "Level/codec",
"version": "5.3.0",
"version": "5.4.0",
"description": "Levelup's encoding logic",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -34,5 +34,5 @@

### #encodeLtgt(ltgt[, opts])
### #encodeLtgt(ltgt)
Encode the ltgt values of option object `ltgt` with given `opts`.
Encode the ltgt values of option object `ltgt`.

@@ -39,0 +39,0 @@ ### #decodeKey(key[, opts])

@@ -5,2 +5,4 @@ var test = require('tape');

test('encode ltgt', function(t){
var codec = new Codec({ keyEncoding: 'hex' });
var ltgt = {

@@ -10,4 +12,2 @@ start: '686579',

};
var codec = new Codec({ keyEncoding: 'hex' });
var encoded = codec.encodeLtgt(ltgt);

@@ -17,3 +17,8 @@ t.equal(encoded.start.toString(), 'hey');

var encoded = codec.encodeLtgt(ltgt, { keyEncoding: 'json' });
ltgt = {
start: '686579',
lte: '686579',
keyEncoding: 'json'
};
encoded = codec.encodeLtgt(ltgt);
t.equal(encoded.start, '"686579"');

@@ -20,0 +25,0 @@ t.equal(encoded.lte, '"686579"');

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