Comparing version 5.0.0-0 to 5.0.0
@@ -7,5 +7,7 @@ # Changelog | ||
## [5.0.0] - 2019-03-29 | ||
### Changed | ||
- Upgrade `leveldown` from `^4.0.0` to `^5.0.0-1` ([#133](https://github.com/Level/level/issues/133)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Upgrade `leveldown` from `^4.0.0` to `^5.0.0` ([#133](https://github.com/Level/level/issues/133), [#144](https://github.com/Level/level/issues/144)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Upgrade `level-packager` from `^3.0.0` to `^5.0.0` ([#113](https://github.com/Level/level/issues/113), [#131](https://github.com/Level/level/issues/131)) ([**@ralphtheninja**](https://github.com/ralphtheninja), [**@vweevers**](https://github.com/vweevers)) | ||
@@ -15,2 +17,5 @@ - Prefer `var` over `const` in README ([`f032b6c`](https://github.com/Level/level/commit/f032b6c)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) | ||
- Tweak copyright years for less maintenance ([`0b9c8ad`](https://github.com/Level/level/commit/0b9c8ad)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) | ||
- Tweak Open Collective documentation ([#137](https://github.com/Level/level/issues/137)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Apply common project tweaks ([#136](https://github.com/Level/level/issues/136), [#138](https://github.com/Level/level/issues/138)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Add `.travis.yml` and `appveyor.yml` to `.npmignore` ([`7b5c340`](https://github.com/Level/level/commit/7b5c340)) ([**@vweevers**](https://github.com/vweevers)) | ||
@@ -22,4 +27,5 @@ ### Added | ||
- Enable OSX on Travis ([#111](https://github.com/Level/level/issues/111)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) | ||
- Add `nyc` and `coveralls` devDependencies ([#115](https://github.com/Level/level/issues/115)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) | ||
- Add `nyc` and `coveralls` devDependencies ([#115](https://github.com/Level/level/issues/115), [#143](https://github.com/Level/level/issues/143)) ([**@ralphtheninja**](https://github.com/ralphtheninja), [**@vweevers**](https://github.com/vweevers)) | ||
- Add `hallmark` devDependency ([#134](https://github.com/Level/level/issues/134)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Add note about Rollup to `README.md` ([#139](https://github.com/Level/level/issues/139)) ([**@vweevers**](https://github.com/vweevers)) | ||
@@ -339,4 +345,6 @@ ### Removed | ||
[unreleased]: https://github.com/level/level/compare/v4.0.0...HEAD | ||
[unreleased]: https://github.com/level/level/compare/v5.0.0...HEAD | ||
[5.0.0]: https://github.com/level/level/compare/v4.0.0...v5.0.0 | ||
[4.0.0]: https://github.com/level/level/compare/v3.0.1...v4.0.0 | ||
@@ -343,0 +351,0 @@ |
@@ -1,11 +0,21 @@ | ||
The MIT License (MIT) | ||
===================== | ||
# The MIT License (MIT) | ||
Copyright (c) 2017 Rod Vagg | ||
--------------------------- | ||
**Copyright © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md).** | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
{ | ||
"name": "level", | ||
"version": "5.0.0", | ||
"description": "Fast & simple storage - a Node.js-style LevelDB wrapper (a convenience package bundling LevelUP & LevelDOWN)", | ||
"version": "5.0.0-0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Level/level.git" | ||
"license": "MIT", | ||
"main": "level.js", | ||
"scripts": { | ||
"test": "standard && hallmark && nyc node test.js && verify-travis-appveyor", | ||
"test-browser-local": "airtap --local test-browser.js", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"postinstall": "opencollective-postinstall || exit 0", | ||
"hallmark": "hallmark --fix", | ||
"dependency-check": "dependency-check . browser.js test*.js", | ||
"prepublishOnly": "npm run dependency-check" | ||
}, | ||
"homepage": "https://github.com/Level/level", | ||
"keywords": [ | ||
"leveldb", | ||
"stream", | ||
"database", | ||
"db", | ||
"store", | ||
"storage", | ||
"json" | ||
], | ||
"main": "level.js", | ||
"browser": "browser.js", | ||
@@ -24,3 +20,3 @@ "dependencies": { | ||
"level-packager": "^5.0.0", | ||
"leveldown": "^5.0.0-1", | ||
"leveldown": "^5.0.0", | ||
"opencollective-postinstall": "^2.0.0" | ||
@@ -31,4 +27,6 @@ }, | ||
"coveralls": "^3.0.2", | ||
"dependency-check": "^3.3.0", | ||
"hallmark": "^0.1.0", | ||
"nyc": "^12.0.2", | ||
"level-community": "^3.0.0", | ||
"nyc": "^13.2.0", | ||
"pinkie": "^2.0.4", | ||
@@ -40,13 +38,2 @@ "standard": "^12.0.0", | ||
}, | ||
"scripts": { | ||
"test": "standard && nyc node test.js && verify-travis-appveyor", | ||
"test-browser-local": "airtap --local test-browser.js", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"postinstall": "opencollective-postinstall || exit 0", | ||
"hallmark": "hallmark --fix CHANGELOG.md UPGRADING.md" | ||
}, | ||
"engines": { | ||
"node": ">=8.6.0" | ||
}, | ||
"license": "MIT", | ||
"collective": { | ||
@@ -56,3 +43,24 @@ "type": "opencollective", | ||
"logo": "https://opencollective.com/level/logo.txt" | ||
}, | ||
"hallmark": { | ||
"community": "level-community" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Level/level.git" | ||
}, | ||
"homepage": "https://github.com/Level/level", | ||
"keywords": [ | ||
"level", | ||
"leveldb", | ||
"stream", | ||
"database", | ||
"db", | ||
"store", | ||
"storage", | ||
"json" | ||
], | ||
"engines": { | ||
"node": ">=8.6.0" | ||
} | ||
} |
199
README.md
@@ -5,30 +5,26 @@ # level | ||
[![level badge][level-badge]](https://github.com/level/awesome) | ||
[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg)](#backers) | ||
[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg)](#sponsors) | ||
[![npm](https://img.shields.io/npm/v/level.svg)](https://www.npmjs.com/package/level) | ||
![Node version](https://img.shields.io/node/v/level.svg) | ||
[![Travis](https://img.shields.io/travis/Level/level.svg?label=travis)](http://travis-ci.org/Level/level) | ||
[![AppVeyor](https://img.shields.io/appveyor/ci/Level/level.svg?label=appveyor)](https://ci.appveyor.com/project/Level/level) | ||
[![dependencies](https://david-dm.org/Level/level.svg)](https://david-dm.org/level/level) | ||
[![level badge][level-badge]](https://github.com/Level/awesome) | ||
[![npm](https://img.shields.io/npm/v/level.svg?label=&logo=npm)](https://www.npmjs.com/package/level) | ||
[![Node version](https://img.shields.io/node/v/level.svg)](https://www.npmjs.com/package/level) | ||
[![Travis](https://img.shields.io/travis/Level/level.svg?logo=travis&label=)](https://travis-ci.org/Level/level) | ||
[![AppVeyor](https://img.shields.io/appveyor/ci/Level/level.svg?logo=appveyor&label=)](https://ci.appveyor.com/project/Level/level) | ||
[![Coverage Status](https://coveralls.io/repos/github/Level/level/badge.svg)](https://coveralls.io/github/Level/level) | ||
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) | ||
[![npm](https://img.shields.io/npm/dm/level.svg)](https://www.npmjs.com/package/level) | ||
[![npm](https://img.shields.io/npm/dm/level.svg?label=dl)](https://www.npmjs.com/package/level) | ||
[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers) | ||
[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors) | ||
## Table of Contents | ||
<details> | ||
<summary>Click to expand</summary> | ||
<details><summary>Click to expand</summary> | ||
* [Introduction](#introduction) | ||
* [Usage](#usage) | ||
* [Supported Platforms](#supported-platforms) | ||
* [API](#api) | ||
* [Promise Support](#promise-support) | ||
* [Events](#events) | ||
* [Contributing](#contributing) | ||
* [Contributors](#contributors) | ||
* [Backers](#backers) | ||
* [Sponsors](#sponsors) | ||
* [License](#license) | ||
- [Introduction](#introduction) | ||
- [Usage](#usage) | ||
- [Supported Platforms](#supported-platforms) | ||
- [API](#api) | ||
- [Promise Support](#promise-support) | ||
- [Events](#events) | ||
- [Contributing](#contributing) | ||
- [Donate](#donate) | ||
- [License](#license) | ||
@@ -41,7 +37,7 @@ </details> | ||
* exports a function that returns a [`levelup`](https://github.com/level/levelup#ctor) instance when invoked | ||
* bundles the current release of [`leveldown`][leveldown] and [`level-js`][level-js] | ||
* leverages encodings using [`encoding-down`][encoding-down]. | ||
- exports a function that returns a [`levelup`](https://github.com/Level/levelup#ctor) instance when invoked | ||
- bundles the current release of [`leveldown`][leveldown] and [`level-js`][level-js] | ||
- leverages encodings using [`encoding-down`][encoding-down]. | ||
Use this package to avoid having to explicitly install `leveldown` and/or `level-js` when you just want to use `levelup`. It uses `leveldown` in Node.js or Electron and `level-js` in browsers (when bundled by [`browserify`](https://github.com/browserify/browserify) or similar). | ||
Use this package to avoid having to explicitly install `leveldown` and/or `level-js` when you just want to use `levelup`. It uses `leveldown` in Node.js or Electron and `level-js` in browsers (when bundled by [`browserify`](https://github.com/browserify/browserify), [`webpack`](https://webpack.js.org/) or similar. Note: [`rollup`](https://rollupjs.org/) fails to properly resolve the [`browser`](package.json) field). | ||
@@ -85,18 +81,20 @@ ## Usage | ||
* [<code><b>level()</b></code>](#ctor) | ||
* [<code>db.<b>open()</b></code>](#open) | ||
* [<code>db.<b>close()</b></code>](#close) | ||
* [<code>db.<b>put()</b></code>](#put) | ||
* [<code>db.<b>get()</b></code>](#get) | ||
* [<code>db.<b>del()</b></code>](#del) | ||
* [<code>db.<b>batch()</b></code> *(array form)*](#batch) | ||
* [<code>db.<b>batch()</b></code> *(chained form)*](#batch_chained) | ||
* [<code>db.<b>isOpen()</b></code>](#isOpen) | ||
* [<code>db.<b>isClosed()</b></code>](#isClosed) | ||
* [<code>db.<b>createReadStream()</b></code>](#createReadStream) | ||
* [<code>db.<b>createKeyStream()</b></code>](#createKeyStream) | ||
* [<code>db.<b>createValueStream()</b></code>](#createValueStream) | ||
- <a href="#ctor"><code><b>level()</b></code></a> | ||
- <a href="#open"><code>db.<b>open()</b></code></a> | ||
- <a href="#close"><code>db.<b>close()</b></code></a> | ||
- <a href="#put"><code>db.<b>put()</b></code></a> | ||
- <a href="#get"><code>db.<b>get()</b></code></a> | ||
- <a href="#del"><code>db.<b>del()</b></code></a> | ||
- <a href="#batch"><code>db.<b>batch()</b></code></a> _(array form)_ | ||
- <a href="#batch_chained"><code>db.<b>batch()</b></code></a> _(chained form)_ | ||
- <a href="#isOpen"><code>db.<b>isOpen()</b></code></a> | ||
- <a href="#isClosed"><code>db.<b>isClosed()</b></code></a> | ||
- <a href="#createReadStream"><code>db.<b>createReadStream()</b></code></a> | ||
- <a href="#createKeyStream"><code>db.<b>createKeyStream()</b></code></a> | ||
- <a href="#createValueStream"><code>db.<b>createValueStream()</b></code></a> | ||
<a name="ctor"></a> | ||
### `db = level(location[, options[, callback]])` | ||
The main entry point for creating a new `levelup` instance. | ||
@@ -148,6 +146,8 @@ | ||
<a name="open"></a> | ||
### `db.open([callback])` | ||
Opens the underlying store. In general you should never need to call this method directly as it's automatically called by <a href="#ctor"><code>levelup()</code></a>. | ||
However, it is possible to *reopen* the store after it has been closed with <a href="#close"><code>close()</code></a>, although this is not generally advised. | ||
However, it is possible to _reopen_ the store after it has been closed with <a href="#close"><code>close()</code></a>, although this is not generally advised. | ||
@@ -157,3 +157,5 @@ If no callback is passed, a promise is returned. | ||
<a name="close"></a> | ||
### `db.close([callback])` | ||
<code>close()</code> closes the underlying store. The callback will receive any error encountered during closing as the first argument. | ||
@@ -166,3 +168,5 @@ | ||
<a name="put"></a> | ||
### `db.put(key, value[, options][, callback])` | ||
<code>put()</code> is the primary method for inserting data into the store. Both `key` and `value` can be of any type as far as `levelup` is concerned. | ||
@@ -176,3 +180,5 @@ | ||
<a name="get"></a> | ||
### `db.get(key[, options][, callback])` | ||
<code>get()</code> is the primary method for fetching data from the store. The `key` can be of any type. If it doesn't exist in the store then the callback or promise will receive an error. A not-found err object will be of type `'NotFoundError'` so you can `err.type == 'NotFoundError'` or you can perform a truthy test on the property `err.notFound`. | ||
@@ -201,4 +207,7 @@ | ||
<a name="del"></a> | ||
### `db.del(key[, options][, callback])` | ||
<code>del()</code> is the primary method for removing data from the store. | ||
```js | ||
@@ -217,7 +226,9 @@ db.del('foo', function (err) { | ||
<a name="batch"></a> | ||
### `db.batch(array[, options][, callback])` *(array form)* | ||
<code>batch()</code> can be used for very fast bulk-write operations (both *put* and *delete*). The `array` argument should contain a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation inside the underlying store. | ||
Each operation is contained in an object having the following properties: `type`, `key`, `value`, where the *type* is either `'put'` or `'del'`. In the case of `'del'` the `value` property is ignored. Any entries with a `key` of `null` or `undefined` will cause an error to be returned on the `callback` and any `type: 'put'` entry with a `value` of `null` or `undefined` will return an error. | ||
### `db.batch(array[, options][, callback])` _(array form)_ | ||
<code>batch()</code> can be used for very fast bulk-write operations (both _put_ and _delete_). The `array` argument should contain a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation inside the underlying store. | ||
Each operation is contained in an object having the following properties: `type`, `key`, `value`, where the _type_ is either `'put'` or `'del'`. In the case of `'del'` the `value` property is ignored. Any entries with a `key` of `null` or `undefined` will cause an error to be returned on the `callback` and any `type: 'put'` entry with a `value` of `null` or `undefined` will return an error. | ||
```js | ||
@@ -244,3 +255,5 @@ var ops = [ | ||
<a name="batch_chained"></a> | ||
### `db.batch()` *(chained form)* | ||
### `db.batch()` _(chained form)_ | ||
<code>batch()</code>, when called with no arguments will return a `Batch` object which can be used to build, and eventually commit, an atomic batch operation. Depending on how it's used, it is possible to obtain greater performance when using the chained form of `batch()` over the array form. | ||
@@ -258,25 +271,25 @@ | ||
<b><code>batch.put(key, value)</code></b> | ||
**`batch.put(key, value)`** | ||
Queue a *put* operation on the current batch, not committed until a `write()` is called on the batch. | ||
Queue a _put_ operation on the current batch, not committed until a `write()` is called on the batch. | ||
This method may `throw` a `WriteError` if there is a problem with your put (such as the `value` being `null` or `undefined`). | ||
<b><code>batch.del(key)</code></b> | ||
**`batch.del(key)`** | ||
Queue a *del* operation on the current batch, not committed until a `write()` is called on the batch. | ||
Queue a _del_ operation on the current batch, not committed until a `write()` is called on the batch. | ||
This method may `throw` a `WriteError` if there is a problem with your delete. | ||
<b><code>batch.clear()</code></b> | ||
**`batch.clear()`** | ||
Clear all queued operations on the current batch, any previous operations will be discarded. | ||
<b><code>batch.length</code></b> | ||
**`batch.length`** | ||
The number of queued operations on the current batch. | ||
<b><code>batch.write([options][, callback])</code></b> | ||
**`batch.write([options][, callback])`** | ||
Commit the queued operations for this batch. All operations not *cleared* will be written to the underlying store atomically, that is, they will either all succeed or fail with no partial commits. | ||
Commit the queued operations for this batch. All operations not _cleared_ will be written to the underlying store atomically, that is, they will either all succeed or fail with no partial commits. | ||
@@ -289,2 +302,3 @@ - `options` is passed on to the underlying store. | ||
<a name="isOpen"></a> | ||
### `db.isOpen()` | ||
@@ -294,7 +308,7 @@ | ||
* *"new"* - newly created, not opened or closed | ||
* *"opening"* - waiting for the underlying store to be opened | ||
* *"open"* - successfully opened the store, available for use | ||
* *"closing"* - waiting for the store to be closed | ||
* *"closed"* - store has been successfully closed, should not be used | ||
- _"new"_ - newly created, not opened or closed | ||
- _"opening"_ - waiting for the underlying store to be opened | ||
- _"open"_ - successfully opened the store, available for use | ||
- _"closing"_ - waiting for the store to be closed | ||
- _"closed"_ - store has been successfully closed, should not be used | ||
@@ -304,7 +318,9 @@ `isOpen()` will return `true` only when the state is "open". | ||
<a name="isClosed"></a> | ||
### `db.isClosed()` | ||
`isClosed()` will return `true` only when the state is "closing" *or* "closed", it can be useful for determining if read and write operations are permissible. | ||
`isClosed()` will return `true` only when the state is "closing" _or_ "closed", it can be useful for determining if read and write operations are permissible. | ||
<a name="createReadStream"></a> | ||
### `db.createReadStream([options])` | ||
@@ -332,19 +348,19 @@ | ||
* `gt` (greater than), `gte` (greater than or equal) define the lower bound of the range to be streamed. Only entries where the key is greater than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries streamed will be the same. | ||
- `gt` (greater than), `gte` (greater than or equal) define the lower bound of the range to be streamed. Only entries where the key is greater than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries streamed will be the same. | ||
* `lt` (less than), `lte` (less than or equal) define the higher bound of the range to be streamed. Only entries where the key is less than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries streamed will be the same. | ||
- `lt` (less than), `lte` (less than or equal) define the higher bound of the range to be streamed. Only entries where the key is less than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries streamed will be the same. | ||
* `reverse` *(boolean, default: `false`)*: stream entries in reverse order. Beware that due to the way that stores like LevelDB work, a reverse seek can be slower than a forward seek. | ||
- `reverse` _(boolean, default: `false`)_: stream entries in reverse order. Beware that due to the way that stores like LevelDB work, a reverse seek can be slower than a forward seek. | ||
* `limit` *(number, default: `-1`)*: limit the number of entries collected by this stream. This number represents a *maximum* number of entries and may not be reached if you get to the end of the range first. A value of `-1` means there is no limit. When `reverse=true` the entries with the highest keys will be returned instead of the lowest keys. | ||
- `limit` _(number, default: `-1`)_: limit the number of entries collected by this stream. This number represents a _maximum_ number of entries and may not be reached if you get to the end of the range first. A value of `-1` means there is no limit. When `reverse=true` the entries with the highest keys will be returned instead of the lowest keys. | ||
* `keys` *(boolean, default: `true`)*: whether the results should contain keys. If set to `true` and `values` set to `false` then results will simply be keys, rather than objects with a `key` property. Used internally by the `createKeyStream()` method. | ||
- `keys` _(boolean, default: `true`)_: whether the results should contain keys. If set to `true` and `values` set to `false` then results will simply be keys, rather than objects with a `key` property. Used internally by the `createKeyStream()` method. | ||
* `values` *(boolean, default: `true`)*: whether the results should contain values. If set to `true` and `keys` set to `false` then results will simply be values, rather than objects with a `value` property. Used internally by the `createValueStream()` method. | ||
- `values` _(boolean, default: `true`)_: whether the results should contain values. If set to `true` and `keys` set to `false` then results will simply be values, rather than objects with a `value` property. Used internally by the `createValueStream()` method. | ||
Legacy options: | ||
* `start`: instead use `gte` | ||
- `start`: instead use `gte` | ||
* `end`: instead use `lte` | ||
- `end`: instead use `lte` | ||
@@ -354,5 +370,6 @@ Underlying stores may have additional options. | ||
<a name="createKeyStream"></a> | ||
### `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 <a href="#createReadStream"><code>createReadStream</code></a> to control the range and direction. | ||
@@ -375,5 +392,6 @@ 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). | ||
<a name="createValueStream"></a> | ||
### `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 <a href="#createReadStream"><code>createReadStream</code></a> to control the range and direction. | ||
@@ -436,3 +454,3 @@ 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). | ||
| Event | Description | Arguments | | ||
|:----------|:----------------------------|:---------------------| | ||
| :-------- | :-------------------------- | :------------------- | | ||
| `put` | Key has been updated | `key, value` (any) | | ||
@@ -457,45 +475,30 @@ | `del` | Key has been deleted | `key` (any) | | ||
`level` is an **OPEN Open Source Project**. This means that: | ||
[`Level/level`](https://github.com/Level/level) is an **OPEN Open Source Project**. This means that: | ||
> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. | ||
See the [`CONTRIBUTING.md`](https://github.com/Level/community/blob/master/CONTRIBUTING.md) file for more details. | ||
See the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details. | ||
## Contributors | ||
## Donate | ||
This project exists thanks to all the people who contribute. [Contribute](CONTRIBUTING.md). | ||
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). 💖 | ||
<a href="https://github.com/Level/level/graphs/contributors"><img src="https://opencollective.com/level/contributors.svg?width=890" /></a> | ||
### Backers | ||
## Backers | ||
[![Open Collective backers](https://opencollective.com/level/backers.svg?width=890)](https://opencollective.com/level) | ||
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/level#backer) | ||
### Sponsors | ||
<a href="https://opencollective.com/level#backers" target="_blank"><img src="https://opencollective.com/level/backers.svg?width=890"></a> | ||
[![Open Collective sponsors](https://opencollective.com/level/sponsors.svg?width=890)](https://opencollective.com/level) | ||
## Sponsors | ||
## License | ||
Support this project by [becoming a sponsor](https://opencollective.com/level#sponsor). Your logo will show up here with a link to your website. | ||
[MIT](LICENSE.md) © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md). | ||
<a href="https://opencollective.com/level/sponsor/0/website" target="_blank"><img src="https://opencollective.com/level/sponsor/0/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/1/website" target="_blank"><img src="https://opencollective.com/level/sponsor/1/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/2/website" target="_blank"><img src="https://opencollective.com/level/sponsor/2/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/3/website" target="_blank"><img src="https://opencollective.com/level/sponsor/3/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/4/website" target="_blank"><img src="https://opencollective.com/level/sponsor/4/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/5/website" target="_blank"><img src="https://opencollective.com/level/sponsor/5/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/6/website" target="_blank"><img src="https://opencollective.com/level/sponsor/6/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/7/website" target="_blank"><img src="https://opencollective.com/level/sponsor/7/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/8/website" target="_blank"><img src="https://opencollective.com/level/sponsor/8/avatar.svg"></a> | ||
<a href="https://opencollective.com/level/sponsor/9/website" target="_blank"><img src="https://opencollective.com/level/sponsor/9/avatar.svg"></a> | ||
[level-badge]: http://leveldb.org/img/badge.svg | ||
## License | ||
[leveldown]: https://github.com/Level/leveldown | ||
Copyright (c) 2012-present `level` [contributors](https://github.com/level/community#contributors). | ||
[level-js]: https://github.com/Level/level-js | ||
`level` is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included `LICENSE.md` file for more details. | ||
[level-badge]: http://leveldb.org/img/badge.svg | ||
[levelup]: https://github.com/level/levelup | ||
[leveldown]: https://github.com/level/leveldown | ||
[level-js]: https://github.com/level/level-js | ||
[encoding-down]: https://github.com/level/encoding-down | ||
[encoding-down]: https://github.com/Level/encoding-down |
@@ -7,6 +7,4 @@ # Upgrade Guide | ||
_Currently available as prerelease: `npm i level@next`._ | ||
Upgraded to [`leveldown@5.0.0`](https://github.com/Level/leveldown/blob/v5.0.0/UPGRADING.md#v5) and (through `level-packager@6`) [`levelup@4`](https://github.com/Level/levelup/blob/v4.0.0/UPGRADING.md#v4) and [`encoding-down@6`](https://github.com/Level/encoding-down/blob/v6.0.0/UPGRADING.md#v6). Please follow these links for more information. A quick summary: range options (e.g. `gt`) are now serialized the same as keys, `{ gt: undefined }` is not the same as `{}`, nullish values are now rejected and streams are backed by [`readable-stream@3`](https://github.com/nodejs/readable-stream#version-3xx). | ||
Upgraded to [`leveldown@5.0.0-1`](https://github.com/Level/leveldown/blob/v5.0.0-1/UPGRADING.md#v500-rc1) and (through `level-packager@6`) [`levelup@4`](https://github.com/Level/levelup/blob/v4.0.0/UPGRADING.md#v4) and [`encoding-down@6`](https://github.com/Level/encoding-down/blob/v6.0.0/UPGRADING.md#v6). Please follow these links for more information. A quick summary: range options (e.g. `gt`) are now serialized the same as keys, `{ gt: undefined }` is not the same as `{}`, nullish values are now rejected and streams are backed by [`readable-stream@3`](https://github.com/nodejs/readable-stream#version-3xx). | ||
In addition, `level` got browser support! It uses [`leveldown`](https://github.com/Level/leveldown) in node and [`level-js`](https://github.com/Level/level-js) in browsers (backed by [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)). As such, [`level-browserify`](https://github.com/Level/level-browserify) is not needed anymore and will be deprecated later on. To learn what the integration of `level-js` means for platform, browser and type support, please see the updated [README](README.md#supported-platforms). | ||
@@ -13,0 +11,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
486
44231
11
10
Updatedleveldown@^5.0.0