<commit_before># modella-level-relations

[![NPM version](https://badge.fury.io/js/modella-level-relations.png)](http://badge.fury.io/js/modella-level-relations)
[![Build Status](https://secure.travis-ci.org/ramitos/modella-level-relations.png)](http://travis-ci.org/ramitos/modella-level-relations)
[![Dependency Status](https://gemnasium.com/ramitos/modella-level-relations.png)](https://gemnasium.com/ramitos/modella-level-relations)
[![Coverage Status](https://coveralls.io/repos/ramitos/modella-level-relations/badge.png?branch=master)](https://coveralls.io/r/ramitos/modella-level-relations?branch=master)
[![Code Climate](https://codeclimate.com/github/ramitos/modella-level-relations.png)](https://codeclimate.com/github/ramitos/modella-level-relations)

## install

```bash
npm install [--save/--save-dev] modella-level-relations
```

## example

```js
var relations = require('modella-level-relations'),
    modella = require('modella'),
    sublevel = require('sublevel'),
    store = require('level-modella'),
    level = require('level'),
    timehat = require('timehat')
    assert = require('assert'),
    series = require('map-series')

var db = level('/tmp/relations')
var sub = sublevel(db)
var User = modella('User')

User.use(store(sub.sublevel('users')))
User.use(relations(sub.sublevel('relations')))
User.attr('id')
User.attr('name')<commit_msg>remove code-climate badge<commit_after># modella-level-relations

[![NPM version](https://badge.fury.io/js/modella-level-relations.png)](http://badge.fury.io/js/modella-level-relations)
[![Build Status](https://secure.travis-ci.org/ramitos/modella-level-relations.png)](http://travis-ci.org/ramitos/modella-level-relations)
[![Dependency Status](https://gemnasium.com/ramitos/modella-level-relations.png)](https://gemnasium.com/ramitos/modella-level-relations)
[![Coverage Status](https://coveralls.io/repos/ramitos/modella-level-relations/badge.png?branch=master)](https://coveralls.io/r/ramitos/modella-level-relations?branch=master)
[![Technical debt analysis](https://www.sidekickjs.com/r/ramitos/modella-level-relations/status_badge.svg)](https://www.sidekickjs.com/r/ramitos/modella-level-relations)

## install

```bash
npm install [--save/--save-dev] modella-level-relations
```

## example

```js
var relations = require('modella-level-relations'),
    modella = require('modella'),
    sublevel = require('sublevel'),
    store = require('level-modella'),
    level = require('level'),
    timehat = require('timehat')
    assert = require('assert'),
    series = require('map-series')

var db = level('/tmp/relations')
var sub = sublevel(db)
var User = modella('User')

User.use(store(sub.sublevel('users')))
User.use(relations(sub.sublevel('relations')))
User.attr('id')
User.attr('name')
{'fraction_non_alphanumeric': 0.19508670520231214, 'fraction_numerical': 0.0, 'mean_word_length': 5.624401913875598, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, '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': '438882', 'n_tokens_mistral': 980, 'n_tokens_neox': 926, 'n_words': 102}