<commit_before># Allege

Make complex conditionals easier to read and write. Written in ES6 (ES2015) as a CommonJS module.

## Introduction

Sometimes, `if` statements can get very complex. For example:

```js
if (foo.bar === 'value_a' || foo.bar === 'value_b' || foo.bar === 'value_c' || foo.bar === 'value_d' || foo.bar === 'value_e') {
    // do something
}
```

With Allege, you can simplify your `if` like so:

```js
if (allege(foo.bar).isAnyOf(
    'value_a', 
    'value_b', 
    'value_c', 
    'value_d',
    'value_e'
)) {
    // do something
}
```

## API & Methods

Allege exposes different functions based on what you're trying to compare. If you pass in one argument, you<commit_msg>docs: add travis CI badge to readme<commit_after># Allege

Make complex conditionals easier to read and write. Written in ES6 (ES2015) as a CommonJS module.

[![Build Status](https://travis-ci.org/brycehanscomb/allege.svg?branch=master)](https://travis-ci.org/brycehanscomb/allege)

## Introduction

Sometimes, `if` statements can get very complex. For example:

```js
if (foo.bar === 'value_a' || foo.bar === 'value_b' || foo.bar === 'value_c' || foo.bar === 'value_d' || foo.bar === 'value_e') {
    // do something
}
```

With Allege, you can simplify your `if` like so:

```js
if (allege(foo.bar).isAnyOf(
    'value_a', 
    'value_b', 
    'value_c', 
    'value_d',
    'value_e'
)) {
    // do something
}
```

## API & Methods

Allege exposes different functions based on what you're trying to compare. If you pass in one argument, you
{'fraction_non_alphanumeric': 0.1563919532770928, 'fraction_numerical': 0.006489292667099286, 'mean_word_length': 3.630630630630631, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '158757', 'n_tokens_mistral': 564, 'n_tokens_neox': 530, 'n_words': 169}