diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index ed1a6964..81b92f78 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -5,8 +5,8 @@
| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) |
| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) |
| **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) |
-| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) |
| **Dominic Tarr** | [**@dominictarr**](https://github.com/dominictarr) | [**@dominictarr@twitter**](https://twitter.com/dominictarr) |
+| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) |
| **Matteo Collina** | [**@mcollina**](https://github.com/mcollina) | [**@matteocollina@twitter**](https://twitter.com/matteocollina) |
| **James Halliday** | [**@substack**](https://github.com/substack) | [**@substack@twitter**](https://twitter.com/substack) |
| **David Björklund** | [**@kesla**](https://github.com/kesla) | [**@david_bjorklund@twitter**](https://twitter.com/david_bjorklund) |
diff --git a/README.md b/README.md
index f84aa28b..8b41ce69 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,14 @@
# levelup
-[![level badge][level-badge]](https://github.com/level/awesome)
-[](https://www.npmjs.com/package/levelup)
-
-[](http://travis-ci.org/Level/levelup)
-[](https://david-dm.org/level/levelup)
-[](https://www.npmjs.com/package/levelup)
+[![level badge][level-badge]](https://github.com/Level/awesome)
+[](https://www.npmjs.com/package/levelup)
+[](https://www.npmjs.com/package/levelup)
+[](https://travis-ci.org/Level/levelup)
+[](https://www.npmjs.com/package/levelup)
[](https://coveralls.io/github/Level/levelup)
[](https://standardjs.com)
+[](#backers)
+[](#sponsors)
## Table of Contents
@@ -24,6 +25,7 @@
- [Support](#support)
- [Contributing](#contributing)
- [Big Thanks](#big-thanks)
+- [Donate](#donate)
- [License](#license)
@@ -34,11 +36,11 @@
LevelDB is a simple key-value store built by Google. 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.
-LevelDB stores entries sorted lexicographically by keys. This makes the [streaming interface](#createReadStream) of `levelup` - which exposes LevelDB iterators as [Readable Streams](https://nodejs.org/docs/latest/api/stream.html#stream_readable_streams) - a very powerful query mechanism.
+LevelDB stores entries sorted lexicographically by keys. This makes the streaming interface of `levelup` - which exposes LevelDB iterators as [Readable Streams](https://nodejs.org/docs/latest/api/stream.html#stream_readable_streams) - a very powerful query mechanism.
-The most common store is [`leveldown`](https://github.com/level/leveldown/) which provides a pure C++ binding to LevelDB. [Many alternative stores are available](https://github.com/Level/awesome/#stores) such as [`level.js`](https://github.com/level/level.js) in the browser or [`memdown`](https://github.com/level/memdown) for an in-memory store. They typically support strings and Buffers for both keys and values. For a richer set of data types you can wrap the store with [`encoding-down`](https://github.com/level/encoding-down).
+The most common store is [`leveldown`](https://github.com/Level/leveldown/) which provides a pure C++ binding to LevelDB. [Many alternative stores are available](https://github.com/Level/awesome/#stores) such as [`level.js`](https://github.com/Level/level.js) in the browser or [`memdown`](https://github.com/Level/memdown) for an in-memory store. They typically support strings and Buffers for both keys and values. For a richer set of data types you can wrap the store with [`encoding-down`](https://github.com/Level/encoding-down).
-**The [`level`](https://github.com/level/level) package is the recommended way to get started.** It conveniently bundles `levelup`, [`leveldown`](https://github.com/level/leveldown/) and [`encoding-down`](https://github.com/level/encoding-down). Its main export is `levelup` - i.e. you can do `var db = require('level')`.
+**The [`level`](https://github.com/Level/level) package is the recommended way to get started.** It conveniently bundles `levelup`, [`leveldown`](https://github.com/Level/leveldown/) and [`encoding-down`](https://github.com/Level/encoding-down). Its main export is `levelup` - i.e. you can do `var db = require('level')`.
## Supported Platforms
@@ -81,20 +83,20 @@ db.put('name', 'levelup', function (err) {
## API
-- [levelup()](#ctor)
-- [db.open()](#open)
-- [db.close()](#close)
-- [db.put()](#put)
-- [db.get()](#get)
-- [db.del()](#del)
-- [db.batch() _(array form)_](#batch)
-- [db.batch() _(chained form)_](#batch_chained)
-- [db.isOpen()](#isOpen)
-- [db.isClosed()](#isClosed)
-- [db.createReadStream()](#createReadStream)
-- [db.createKeyStream()](#createKeyStream)
-- [db.createValueStream()](#createValueStream)
-- [db.iterator()](#iterator)
+- levelup()
+- db.open()
+- db.close()
+- db.put()
+- db.get()
+- db.del()
+- db.batch() _(array form)_
+- db.batch() _(chained form)_
+- db.isOpen()
+- db.isClosed()
+- db.createReadStream()
+- db.createKeyStream()
+- db.createValueStream()
+- db.iterator()
### Special Notes
@@ -106,7 +108,7 @@ db.put('name', 'levelup', function (err) {
The main entry point for creating a new `levelup` instance.
-- `db` must be an [`abstract-leveldown`](https://github.com/level/abstract-leveldown) compliant store.
+- `db` must be an [`abstract-leveldown`](https://github.com/Level/abstract-leveldown) compliant store.
- `options` is passed on to the underlying store when opened and is specific to the type of store being used
Calling `levelup(db)` will also open the underlying store. This is an asynchronous operation which will trigger your callback if you provide one. The callback should take the form `function (err, db) {}` where `db` is the `levelup` instance. If you don't provide a callback, any read & write operations are simply queued internally until the store is fully opened.
@@ -347,7 +349,7 @@ Legacy options:
### `db.createKeyStream([options])`
-Returns a [Readable Stream](https://nodejs.org/docs/latest/api/stream.html#stream_readable_streams) of keys rather than key-value pairs. Use the same options as described for [`createReadStream`](#createReadStream) to control the range and direction.
+Returns a [Readable Stream](https://nodejs.org/docs/latest/api/stream.html#stream_readable_streams) of keys rather than key-value pairs. Use the same options as described for createReadStream to control the range and direction.
You can also obtain this stream by passing an options object to `createReadStream()` with `keys` set to `true` and `values` set to `false`. The result is equivalent; both streams operate in [object mode](https://nodejs.org/docs/latest/api/stream.html#stream_object_mode).
@@ -368,7 +370,7 @@ db.createReadStream({ keys: true, values: false })
### `db.createValueStream([options])`
-Returns a [Readable Stream](https://nodejs.org/docs/latest/api/stream.html#stream_readable_streams) of values rather than key-value pairs. Use the same options as described for [`createReadStream`](#createReadStream) to control the range and direction.
+Returns a [Readable Stream](https://nodejs.org/docs/latest/api/stream.html#stream_readable_streams) of values rather than key-value pairs. Use the same options as described for createReadStream to control the range and direction.
You can also obtain this stream by passing an options object to `createReadStream()` with `values` set to `true` and `keys` set to `false`. The result is equivalent; both streams operate in [object mode](https://nodejs.org/docs/latest/api/stream.html#stream_object_mode).
@@ -389,17 +391,17 @@ db.createReadStream({ keys: false, values: true })
### `db.iterator([options])`
-Returns an [`abstract-leveldown` iterator](https://github.com/Level/abstract-leveldown/#abstractleveldown_iteratoroptions), which is what powers the readable streams above. Options are the same as the range options of [`createReadStream()`](#createReadStream) and are passed to the underlying store.
+Returns an [`abstract-leveldown` iterator](https://github.com/Level/abstract-leveldown/#abstractleveldown_iteratoroptions), which is what powers the readable streams above. Options are the same as the range options of createReadStream and are passed to the underlying store.
#### What happened to `db.createWriteStream`?
-`db.createWriteStream()` has been removed in order to provide a smaller and more maintainable core. It primarily existed to create symmetry with `db.createReadStream()` but through much [discussion](https://github.com/level/levelup/issues/199), removing it was the best course of action.
+`db.createWriteStream()` has been removed in order to provide a smaller and more maintainable core. It primarily existed to create symmetry with `db.createReadStream()` but through much [discussion](https://github.com/Level/levelup/issues/199), removing it was the best course of action.
The main driver for this was performance. While `db.createReadStream()` performs well under most use cases, `db.createWriteStream()` was highly dependent on the application keys and values. Thus we can't provide a standard implementation and encourage more `write-stream` implementations to be created to solve the broad spectrum of use cases.
-Check out the implementations that the community has already produced [here](https://github.com/level/levelup/wiki/Modules#write-streams).
+Check out the implementations that the community has already produced [here](https://github.com/Level/levelup/wiki/Modules#write-streams).
## Promise Support
@@ -462,13 +464,13 @@ db.on('put', function (key, value) {
## Extending
-A list of Level modules and projects can be found in the wiki. We are in the process of moving all this to [`awesome`](https://github.com/Level/awesome/).
+A list of Level modules and projects can be found in the wiki. We are in the process of moving all this to [`awesome`](https://github.com/Level/awesome/).
## Multi-process Access
Stores like LevelDB are thread-safe but they are **not** suitable for accessing with multiple processes. You should only ever have a store open from a single Node.js process. Node.js clusters are made up of multiple processes so a `levelup` instance cannot be shared between them either.
-See the aformentioned wiki for modules like [multilevel](https://github.com/juliangruber/multilevel), that may help if you require a single store to be shared across processes.
+See the aformentioned wiki for modules like [multilevel](https://github.com/juliangruber/multilevel), that may help if you require a single store to be shared across processes.
## Support
@@ -492,6 +494,18 @@ Cross-browser Testing Platform and Open Source ♥ Provided by [Sauce Labs](http
[](https://saucelabs.com)
+## Donate
+
+To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level), [npm](https://www.npmjs.com/) packages and (soon) [our website](http://leveldb.org). 💖
+
+### Backers
+
+[](https://opencollective.com/level)
+
+### Sponsors
+
+[](https://opencollective.com/level)
+
## License
[MIT](LICENSE.md) © 2012-present [Contributors](CONTRIBUTORS.md).
diff --git a/package.json b/package.json
index 453f9109..f935849b 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,9 @@
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test-browsers": "airtap --loopback airtap.local test/index.js",
"test-browser-local": "airtap --local test/index.js",
- "hallmark": "hallmark --fix"
+ "hallmark": "hallmark --fix",
+ "dependency-check": "dependency-check . buster.js test/*.js",
+ "prepublishOnly": "npm run dependency-check"
},
"dependencies": {
"deferred-leveldown": "~5.0.0",
@@ -23,28 +25,25 @@
"async": "^2.5.0",
"bl": "^2.0.0",
"browserify": "^16.0.0",
- "bustermove": "~1.0.0",
- "concat-stream": "~2.0.0",
- "coveralls": "~3.0.2",
- "delayed": "~1.0.1",
+ "bustermove": "^1.0.0",
+ "concat-stream": "^2.0.0",
+ "coveralls": "^3.0.2",
+ "delayed": "^1.0.1",
+ "dependency-check": "^3.3.0",
"encoding-down": "^6.0.0",
"hallmark": "^0.1.0",
"level-community": "^3.0.0",
"memdown": "^3.0.0",
- "nyc": "~13.1.0",
- "pinkie": "~2.0.4",
- "referee": "~1.2.0",
+ "nyc": "^13.1.0",
+ "pinkie": "^2.0.4",
+ "referee": "^1.2.0",
"safe-buffer": "^5.1.0",
"standard": "^12.0.0",
"tape": "^4.7.0",
"trickle": "0.0.2"
},
"hallmark": {
- "community": "level-community",
- "validateLinks": false,
- "ignore": [
- "README.md"
- ]
+ "community": "level-community"
},
"repository": {
"type": "git",