New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

level-hooks

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-hooks - npm Package Compare versions

Comparing version 4.3.2 to 4.4.0

17

index.js

@@ -21,2 +21,12 @@ var ranges = require('string-range')

function getKeyEncoding (db) {
if(db && db._getKeyEncoding)
return db._getKeyEncoding(db)
}
function getValueEncoding (db) {
if(db && db._getValueEncoding)
return db._getValueEncoding(db)
}
function remover (array, item) {

@@ -40,3 +50,3 @@ return function () {

if(!hook) hook = prefix, prefix = ''
var h = {test: ranges.checker(prefix), hook: hook}
var h = {test: ranges.checker(prefix), hook: hook, prefix: prefix}
prehooks.push(h)

@@ -100,3 +110,8 @@ return remover(prehooks, h)

}
ch.keyEncoding = ch.keyEncoding || getKeyEncoding(ch.prefix)
ch.valueEncoding = ch.valueEncoding || getValueEncoding(ch.prefix)
b.push(ch)
console.log(b)
hook(ch, b.length - 1)

@@ -103,0 +118,0 @@ return this

2

package.json
{
"name": "level-hooks",
"description": "pre/post hooks for leveldb",
"version": "4.3.2",
"version": "4.4.0",
"homepage": "https://github.com/dominictarr/level-hooks",

@@ -6,0 +6,0 @@ "repository": {

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