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

level-sublevel

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-sublevel - npm Package Compare versions

Comparing version 6.3.7 to 6.3.8

2

package.json
{
"name": "level-sublevel",
"description": "partition levelup databases",
"version": "6.3.7",
"version": "6.3.8",
"homepage": "https://github.com/dominictarr/level-sublevel",

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

@@ -92,2 +92,6 @@ var ltgt = require('ltgt')

r.reverse = !!range.reverse
//if there where no ranges, then then just use a prefix.
if(!r.gte &&!r.lte) return [prefix]
return r

@@ -94,0 +98,0 @@ }

@@ -1,3 +0,47 @@

var tape = require('tape')
var levelup = require('level-test')()
var base = require('../')(levelup('test-sublevels', {valueEncoding: 'json'}))
var test = require('tape')
test('subsections', function (t) {
var foo = base.sublevel('foo')
var bar = base.sublevel('bar')
var n, m, o = m = n = 0
foo.post(function (op) {
n ++
})
//this should do the same
foo.post({}, function (op) {
m ++
})
foo.post({gte: 'm'}, function (op) {
o ++
})
base.batch([
{ key: 'a', value: 1, type: 'put', prefix: foo },
{ key: 'k', value: 2, type: 'put', prefix: foo },
{ key: 'q', value: 3, type: 'put', prefix: foo },
{ key: 'z', value: 4, type: 'put', prefix: foo },
//into the main base
{ key: 'b', value: 5, type: 'put'},
{ key: 'b', value: 5, type: 'put', prefix: bar}
], function (err) {
t.equal(n, 4)
t.equal(m, 4)
t.equal(o, 2)
t.end()
})
})
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