<commit_before>![Seneca](http://senecajs.org/files/assets/seneca-logo.png)
> A [Seneca.js][] data storage plugin

# seneca-level-store

[![npm version][npm-badge]][npm-url]
[![Build Status][travis-badge]][travis-url]
[![Coverage Status][coverage-badge]][coverage-url]
[![Code Climate][codeclimate-badge]][codeclimate-url]
[![Dependency Status][david-badge]][david-url]
[![Gitter][gitter-badge]][gitter-url]


Lead Maintainer: [<NAME>](https://github.com/blainsmith)

## Description

A storage engine that uses [leveldb][] to persist data. It may also be used as an example on how to
implement a storage plugin for Seneca using an underlying key-value store.

seneca-level-store's source can be read in an annotated fashion by,

- running `npm run annotate`

The annotated source can be found locally at [./doc/level-store.html](./doc/level-store.html).

If you're using this module, and need help, you can:

- Post a [github issue][],
- Tweet to [@senecajs][],
- Ask on the [Gitter][gitter-url].

If you are new to Seneca in general, please take a look at [senecajs.org][]. We have everything from
tutorials to sample apps to help get you up and running quickly.

### Seneca compatibility
Supports Seneca versions **1.x**, **2.x** and **3.x**

## Install
To install, simply use npm. Remember you will need to install [Seneca.js][] if you haven't already.

```
npm install seneca
npm install seneca-level-store
```

## Quick Example

```js
var seneca = require('seneca')()
seneca.use('level-store', {
  folder: 'db'
})

seneca.ready(function() {
  var apple = seneca.make$('fruit')
  apple.name = 'Pink Lady'
  apple.price = 0.99
  apple.save$(function (err, apple) {
    console.log("apple.id = " + apple.id)
  })
})
```

## Usage
You don't use this module directly. It provides an underlying data storage engine for the Seneca entity API:
<commit_msg>Updated readme example to use entity and basic<commit_after>![Seneca](http://senecajs.org/files/assets/seneca-logo.png)
> A [Seneca.js][] data storage plugin

# seneca-level-store

[![npm version][npm-badge]][npm-url]
[![Build Status][travis-badge]][travis-url]
[![Coverage Status][coverage-badge]][coverage-url]
[![Code Climate][codeclimate-badge]][codeclimate-url]
[![Dependency Status][david-badge]][david-url]
[![Gitter][gitter-badge]][gitter-url]


Lead Maintainer: [<NAME>](https://github.com/blainsmith)

## Description

A storage engine that uses [leveldb][] to persist data. It may also be used as an example on how to
implement a storage plugin for Seneca using an underlying key-value store.

seneca-level-store's source can be read in an annotated fashion by,

- running `npm run annotate`

The annotated source can be found locally at [./doc/level-store.html](./doc/level-store.html).

If you're using this module, and need help, you can:

- Post a [github issue][],
- Tweet to [@senecajs][],
- Ask on the [Gitter][gitter-url].

If you are new to Seneca in general, please take a look at [senecajs.org][]. We have everything from
tutorials to sample apps to help get you up and running quickly.

### Seneca compatibility
Supports Seneca versions **1.x**, **2.x** and **3.x**

## Install
To install, simply use npm. Remember you will need to install [Seneca.js][] if you haven't already.

```
npm install seneca
npm install seneca-level-store
```

## Quick Example

```js
var seneca = require('seneca')()
seneca.use('level-store', {
  folder: 'db'
})
.use('entity')
.use('basic')

seneca.ready(function() {
  var apple = seneca.make$('fruit')
  apple.name = '<NAME>'
  apple.price = 0.99
  apple.save$(function (err, apple) {
    console.log("apple.id = " + apple.id)
  })
})
```

## Usage
You don't use this module directly. It provides an underlying data storage engine for the Seneca entity API:

{'fraction_non_alphanumeric': 0.14988041456284878, 'fraction_numerical': 0.0031889449906989105, 'mean_word_length': 4.527165932452276, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2287090', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1250, 'n_words': 410}