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

levelup

Package Overview
Dependencies
Maintainers
3
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

levelup - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

4

lib/batch.js

@@ -18,2 +18,3 @@ /* Copyright (c) 2012-2015 LevelUP contributors

this.ops = []
this.length = 0
}

@@ -33,2 +34,3 @@

this.ops.push({ type : 'put', key : key, value : value })
this.length++

@@ -49,2 +51,3 @@ return this

this.ops.push({ type : 'del', key : key })
this.length++

@@ -62,2 +65,3 @@ return this

this.ops = []
this.length = 0
return this

@@ -64,0 +68,0 @@ }

15

package.json
{
"name": "levelup",
"description": "Fast & simple storage - a Node.js-style LevelDB wrapper",
"version": "1.2.1",
"version": "1.3.0",
"contributors": [

@@ -37,3 +37,3 @@ "Rod Vagg <r@va.gg> (https://github.com/rvagg)",

"dependencies": {
"deferred-leveldown": "~1.0.0",
"deferred-leveldown": "~1.2.1",
"level-codec": "~6.0.0",

@@ -43,17 +43,18 @@ "level-errors": "~1.0.3",

"prr": "~1.0.1",
"semver": "~4.3.3",
"semver": "~5.0.3",
"xtend": "~4.0.0"
},
"devDependencies": {
"async": "~0.9.0",
"async": "~1.4.2",
"bustermove": "~1.0.0",
"tap": "0.x.x",
"delayed": "~1.0.1",
"faucet": "~0.0.1",
"leveldown": "^1.1.0",
"memdown": "~1.0.0",
"memdown": "~1.1.0",
"msgpack-js": "~0.3.0",
"referee": "~1.1.1",
"rimraf": "~2.3.2",
"rimraf": "~2.4.3",
"slow-stream": "0.0.4",
"tape": "~4.0.0"
"tape": "~4.2.1"
},

@@ -60,0 +61,0 @@ "browser": {

@@ -9,2 +9,3 @@ LevelUP

[![Build Status](https://secure.travis-ci.org/Level/levelup.png)](http://travis-ci.org/Level/levelup)
[![dependencies](https://david-dm.org/Level/levelup.svg)](https://david-dm.org/level/levelup)

@@ -26,3 +27,3 @@ [![NPM](https://nodei.co/npm/levelup.png?stars&downloads&downloadRank)](https://nodei.co/npm/levelup/) [![NPM](https://nodei.co/npm-dl/levelup.png?months=6&height=3)](https://nodei.co/npm/levelup/)

* <a href="#contributing">Contributing</a>
* <a href="#licence">Licence &amp; copyright</a>
* <a href="#license">Licence &amp; copyright</a>

@@ -33,3 +34,3 @@ <a name="intro"></a>

**[LevelDB](https://github.com/google/leveldb)** is a simple key/value data store built by Google, inspired by BigTable. It's used in Google Chrome and many other products. LevelDB supports arbitrary byte arrays as both keys and values, singular *get*, *put* and *delete* operations, *batched put and delete*, bi-directional iterators and simple compression using the very fast [Snappy](http://code.google.com/p/snappy/) algorithm.
**[LevelDB](https://github.com/google/leveldb)** is a simple key/value data store built by Google, inspired by BigTable. It's used in Google Chrome and many other products. LevelDB supports arbitrary byte arrays as both keys and values, singular *get*, *put* and *delete* operations, *batched put and delete*, bi-directional iterators and simple compression using the very fast [Snappy](http://google.github.io/snappy/) algorithm.

@@ -353,2 +354,6 @@ **LevelUP** aims to expose the features of LevelDB in a **Node.js-friendly way**. All standard `Buffer` encoding types are supported, as is a special JSON encoding. LevelDB's iterators are exposed as a Node.js-style **readable stream**.

<b><code>batch.length</code></b>
The number of queued operations on the current batch.
<b><code>batch.write([callback])</code></b>

@@ -355,0 +360,0 @@

@@ -167,2 +167,21 @@ /* Copyright (c) 2012-2015 LevelUP contributors

, 'batch() exposes ops queue length': function (done) {
this.openTestDatabase(function (db) {
var batch = db.batch()
.put('one', '1')
.del('two')
.put('three', '3')
assert.equals(batch.length, 3)
batch.clear()
assert.equals(batch.length, 0)
batch
.del('1')
.put('2', 'two')
.put('3', 'three')
.del('3')
assert.equals(batch.length, 4)
done()
})
}
, 'batch() with can manipulate data from put()': function (done) {

@@ -169,0 +188,0 @@ // checks encoding and whatnot

Sorry, the diff of this file is not supported yet

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