<commit_before># Introduction

[![Build Status](https://secure.travis-ci.org/adrai/rule-validator.png)](http://travis-ci.org/adrai/rule-validator)

[![browser support](https://ci.testling.com/adrai/rule-validator.png)](https://ci.testling.com/adrai/rule-validator)

Rule-validator is a javascript module based on tv4. And works for node.js and in the browser.
It can be very useful if you work with (d)ddd, cqrs, eventsourcing, domain, commands and events, etc.

# Dependencies
You need [tv4](https://github.com/geraintluff/tv4) and [lodash](http://lodash.com/) or [underscore](http://documentcloud.github.com/underscore/).

# Download
Releases for a browser are available for download from GitHub.

| **Version** | **Description** | **Size** |
|:------------|:----------------|:---------|
| `rule-validator-0.3.0.js` | *uncompressed, with comments* | [Download](https://raw.github.com/adrai/rule-validator/master/rule-validator-0.3.0.js) |
| `rule-validator-0.3.0.min.js` | *compressed, without comments* | [Download](https://raw.github.com/adrai/rule-validator/master/rule-validator-0.3.0.min.js) |

# Installation (node.js)

    $ npm install rule-validator

# Usage

    <!-- in Browser -->
    <script src="rule-validator.js"></script>

    // in node.js
    var base = require('rule-validator');<commit_msg>fix readme<commit_after># Introduction

[![Build Status](https://secure.travis-ci.org/adrai/rule-validator.png)](http://travis-ci.org/adrai/rule-validator)

[![browser support](https://ci.testling.com/adrai/rule-validator.png)](https://ci.testling.com/adrai/rule-validator)

Rule-validator is a javascript module based on tv4. And works for node.js and in the browser.
It can be very useful if you work with (d)ddd, cqrs, eventsourcing, domain, commands and events, etc.

# Dependencies
You need [tv4](https://github.com/geraintluff/tv4) and [lodash](http://lodash.com/) or [underscore](http://documentcloud.github.com/underscore/).

# Download
Releases for a browser are available for download from GitHub.

| **Version** | **Description** | **Size** |
|:------------|:----------------|:---------|
| `rule-validator-0.3.1.js` | *uncompressed, with comments* | [Download](https://raw.github.com/adrai/rule-validator/master/rule-validator-0.3.1.js) |
| `rule-validator-0.3.1.min.js` | *compressed, without comments* | [Download](https://raw.github.com/adrai/rule-validator/master/rule-validator-0.3.1.min.js) |

# Installation (node.js)

    $ npm install rule-validator

# Usage

    <!-- in Browser -->
    <script src="rule-validator.js"></script>

    // in node.js
    var base = require('rule-validator');
{'fraction_non_alphanumeric': 0.20205871139916126, 'fraction_numerical': 0.011437285550895921, 'mean_word_length': 3.652482269503546, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3645126', 'n_tokens_mistral': 889, 'n_tokens_neox': 898, 'n_words': 172}