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.2.0 to 5.3.0

test/ltgt.js

13

index.js

@@ -62,2 +62,15 @@ var encodings = require('./lib/encodings');

var ltgtKeys = ['lt', 'gt', 'lte', 'gte', 'start', 'end'];
Codec.prototype.encodeLtgt = function(ltgt, opts){
var self = this;
var ret = {};
Object.keys(ltgt).forEach(function(key){
ret[key] = ltgtKeys.indexOf(key) > -1
? self.encodeKey(ltgt[key], opts)
: ltgt[key]
});
return ret;
};
Codec.prototype.keyAsBuffer = function(opts){

@@ -64,0 +77,0 @@ return this._keyEncoding(opts).buffer;

2

package.json
{
"name": "level-codec",
"repository": "Level/codec",
"version": "5.2.0",
"version": "5.3.0",
"description": "Levelup's encoding logic",

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

@@ -34,2 +34,6 @@

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

@@ -36,0 +40,0 @@

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