# @nlocnila/lsdb

> LevelUP & localStorageDOWN

Latest version **1.0.1** (published 2016-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nlocnila/lsdb
pnpm add @nlocnila/lsdb
yarn add @nlocnila/lsdb
bun add @nlocnila/lsdb
```

## 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.0.1 |
| Published | 2016-06-01 |
| First published | 2016-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nlocnila |
| Maintainers | nlocnila |

## Links

- npm: https://www.npmjs.com/package/@nlocnila/lsdb
- npm.io page: https://npm.io/package/@nlocnila/lsdb

## Dependencies (2)

- [levelup](https://npm.io/package/levelup.md) ^1.3.1
- [localstorage-down](https://npm.io/package/localstorage-down.md) ^0.6.6

## Recent versions

- 1.0.1 (latest) — 2016-06-01
- 1.0.0 — 2016-06-01

## README

# lsdb
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![Build Status](https://travis-ci.org/nlocnila/lsdb.svg?branch=master)](https://travis-ci.org/nlocnila/lsdb)

LevelUP & LocalstorageDOWN

## Why

You get the benefit of both localStorage as a storage backend and a MemDB-like implementation (in-memory storage) as a fallback for the price of one package.

## Install

    $ npm install @nlocnila/lsdb

## Usage
```javascript
'use strict'

var LSDB = require('../index')

var db = LSDB('mydb')

db.put('test', 'hello world', function (err) {
  if (err) { 
    return console.error(err)
  }
  db.get('test', function (err, value) {
    if (err) {
      return console.error(err)
    }
    console.log(value) // hello world
  })
})
```

## API
### LSDB(location, [options], [callback])
```javascript
{
  location: String,
  options: Object,
  callback: Function
}
```
Initializes a new `lsdb`, `location` is the only parameter required. See [LevelUP](https://www.npmjs.com/package/levelup#ctor) for more details. 

### db#put
### db#get
### db#del
Supports basic functionality implemented on top of the [Abstract LevelDOWN API](https://github.com/Level/abstract-leveldown). See [localstorage-down](https://github.com/No9/localstorage-down) package for more details.

## Browser Support
Check out the following [link](https://github.com/No9/localstorage-down#browser-support) to see what is supported out of box

## License
MIT

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