# level-lazy-db

> Open leveldb only when you need to

Latest version **1.2.0** (published 2014-04-15) · 0 weekly downloads

## Install

```sh
npm install level-lazy-db
pnpm add level-lazy-db
yarn add level-lazy-db
bun add level-lazy-db
```

## 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 | 1.2.0 |
| Published | 2014-04-15 |
| First published | 2014-04-15 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/level-lazy-db
- Repository: https://github.com/mafintosh/level-lazy-db
- Issues: https://github.com/mafintosh/level-lazy-db/issues
- npm.io page: https://npm.io/package/level-lazy-db

## Dependencies (4)

- [fwd](https://npm.io/package/fwd.md) ^0.2.2
- [xtend](https://npm.io/package/xtend.md) ^3.0.0
- [thunky](https://npm.io/package/thunky.md) ^0.1.0
- [readable-stream](https://npm.io/package/readable-stream.md) ^1.0.26-4

## Recent versions

- 1.2.0 (latest) — 2014-04-15
- 1.1.0 — 2014-04-15
- 1.0.1 — 2014-04-15
- 1.0.0 — 2014-04-15

## README

# level-lazy-db

Open leveldb only when you need to

	npm install level-lazy-db

[![build status](https://secure.travis-ci.org/mafintosh/level-lazy-db.png)](http://travis-ci.org/mafintosh/level-lazy-db)

## Usage

Simply pass a function the calls it callback with a levelup instance.
The method will only be called once and only when you call a io method on the db.

``` js
var lazy = require('level-lazy-db');
var level = require('level');

var db = lazy(function(cb) {
	cb(null, level('/tmp/my.db'));
});

db.get('test', function(err, val) {
	// calling a method opens the db
});

```

## License

MIT

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