<commit_before># JsSearch: client-side search library

JsSearch enables efficient client-side searches of JavaScript and JSON objects.
It is ES5 compatible and does not require jQuery or any other third-party libraries.

You can see a live demo of JS search here:

[bvaughn.github.io/js-search/](http://bvaughn.github.io/js-search/)

There are also some JS Perf benchmarks comparing JS Search to Lunr JS:

[jsperf.com/js-search-vs-lunr-js](http://jsperf.com/js-search-vs-lunr-js)

### Installation

You can install using either [Bower](http://bower.io/) or [NPM](https://www.npmjs.com/) like so:

```shell
npm install js-search
bower install js-search
```

### Overview

Configure JsSearch by telling it which fields it should analyze for searching and then add the objects to be searched.

For example:

```javascript<commit_msg>Split JS Perf benchmarks down some<commit_after># JsSearch: client-side search library

JsSearch enables efficient client-side searches of JavaScript and JSON objects.
It is ES5 compatible and does not require jQuery or any other third-party libraries.

You can see a live demo of JS search here:

[bvaughn.github.io/js-search/](http://bvaughn.github.io/js-search/)

There are also some JS Perf benchmarks comparing JS Search to Lunr JS:

[jsperf.com/js-search-vs-lunr-js](http://jsperf.com/js-search-vs-lunr-js)
* Building an index: [jsperf.com/js-search-vs-lunr-js-build-search-index](http://jsperf.com/js-search-vs-lunr-js-build-search-index) (94% faster) 
* Searching text: [jsperf.com/js-search-vs-lunr-js-running-searches](http://jsperf.com/js-search-vs-lunr-js-running-searches) (78% faster)

### Installation

You can install using either [Bower](http://bower.io/) or [NPM](https://www.npmjs.com/) like so:

```shell
npm install js-search
bower install js-search
```

### Overview

Configure JsSearch by telling it which fields it should analyze for searching and then add the objects to be searched.

For example:

```javascript
{'fraction_non_alphanumeric': 0.11794611082867311, 'fraction_numerical': 0.003050330452465684, 'mean_word_length': 4.406593406593407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4274276', 'n_tokens_mistral': 655, 'n_tokens_neox': 625, 'n_words': 207}