# level-peek

> peek the first or last record in a leveldb range.

Latest version **2.0.2** (published 2016-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install level-peek
pnpm add level-peek
yarn add level-peek
bun add level-peek
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2016-10-12 |
| First published | 2013-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/level-peek
- Repository: https://github.com/dominictarr/level-peek
- Issues: https://github.com/dominictarr/level-peek/issues
- npm.io page: https://npm.io/package/level-peek

## Dependencies (2)

- [pull-level](https://npm.io/package/pull-level.md) ^2.0.3
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.4.5

## Recent versions

- 2.0.2 (latest) — 2016-10-12
- 2.0.1 — 2016-09-26
- 2.0.0 — 2014-08-17
- 1.0.6 — 2013-04-01
- 1.0.5 — 2013-03-26
- 1.0.4 — 2013-03-26
- 1.0.3 — 2013-03-26
- 1.0.1 — 2013-03-26
- 1.0.0 — 2013-03-26

## README

# level-peek

peek the first or last record in a leveldb range.

## example

``` js
var levelup = require('levelup')
var db = levelup(PATH_TO_DB)

var peek = require('level-peek')

//get the first value, 'a' or after
peek.first(db, {start: 'a'}, function (err, key, value) {
  console.log(key, value)
})

//get last value, 'z' or before.
peek.last(db, {end: 'z'}, function (err, key, value) {
  console.log(key, value)
})
```


see also, [level-fix-range](https://github.com/dominictarr/level-fix-range)
and https://github.com/rvagg/node-levelup/issues/110

## License

MIT

---
_Source: https://npm.io/package/level-peek · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
