Skip to content

Commit

Permalink
Remove legacy range options from README (Level/community#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Apr 17, 2021
1 parent 40741c3 commit e56c6b1
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ If no callback is passed, a promise is returned.
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
var ops = [
const ops = [
{ type: 'del', key: 'father' },
{ type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' },
{ type: 'put', key: 'dob', value: '16 February 1941' },
Expand Down Expand Up @@ -367,12 +367,6 @@ You can supply an options object as the first parameter to `createReadStream()`

- `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`

- `end`: instead use `lte`

Underlying stores may have additional options.

<a name="createKeyStream"></a>
Expand Down Expand Up @@ -458,7 +452,7 @@ The only exception is the `level` constructor itself, which if no callback is pa
Example:

```js
var db = level('my-db')
const db = level('my-db')

db.put('foo', 'bar')
.then(function () { return db.get('foo') })
Expand All @@ -469,8 +463,8 @@ db.put('foo', 'bar')
Or using `async/await`:

```js
var main = async () => {
var db = level('my-db')
const main = async () => {
const db = level('my-db')

await db.put('foo', 'bar')
console.log(await db.get('foo'))
Expand Down

0 comments on commit e56c6b1

Please sign in to comment.