Socket
Socket
Sign inDemoInstall

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.11 to 6.3.12

2

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

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

@@ -45,3 +45,3 @@ # level-sublevel

This can be used to copy an old level-sublevel into a the format.
This can be used to copy an old level-sublevel into the new format.

@@ -52,3 +52,3 @@ ## Stability

This module is working well, but may change in the future as its use is futher explored.
This module is working well, but may change in the future as its use is further explored.

@@ -65,10 +65,6 @@ ## Example

//put a key into the main levelup
db.put(key, value, function () {
})
db.put(key, value, function () {})
//put a key into the sub-section!
sub.put(key2, value, function () {
})
sub.put(key2, value, function () {})
```

@@ -100,4 +96,4 @@

type: 'put',
prefix: sub //NOTE pass the destination db to add
//and the value will end up in that subsection!
// NOTE: pass the destination db to add the value to that subsection!
prefix: sub
})

@@ -107,13 +103,8 @@ })

db.put('key', 'VALUE', function (err) {
//read all the records inserted by the hook!
sub.createReadStream()
.on('data', console.log)
// read all the records inserted by the hook!
sub.createReadStream().on('data', console.log)
})
```
Notice that `sub` is the second argument to `add`,
which tells the hook to save the new record in the `sub` section.
Notice that the `prefix` property to `add()` is set to `sub`, which tells the hook to save the new record in the `sub` section.

@@ -124,3 +115,3 @@ ## Batches

if set, this row will be inserted into that database section,
instead of the current section.
instead of the current section, similar to the `pre` hook above.

@@ -127,0 +118,0 @@ ``` js

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