<commit_before>fauxmongo
=========
Match MongoDB queries, apply updates and test aggregation pipelines on local documents.


Installation and Use
--------------------
```shell
$ npm install fauxmongo
```
```javascript
var fauxmongo = require ('fauxmongo');
fauxmongo.update (document, update);
fauxmongo.update (query, document, update);
var queryMatchesDoc = fauxmongo.matchQuery (document, query);
var aggregatedDocs = fauxmongo.aggregate (docs, pipeline);
// get the result set of each stage in an aggregation pipeline
var stageOutputs = fauxmongo.aggregate (docs, pipeline, true);
// recursively overwrite freshly-queried state to local object
fauxmongo.merge (update, state, query, projection);
```


Development
-----------
`doczar` is developed and maintained by Kevin "Schmidty" Smith under the MIT license. If you want to
see continued development on `doczar`, please help me [pay my bills!](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PN6C2AZTS2FP8&lc=US&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)


Tests
-----
The tests require a MongoDB instance to be accessible at the default host - `127.0.0.1:27017`. The
db/collection is `test-fauxmongo.test-fauxmongo` and all records created will be removed before the
tests finish.<commit_msg>fixed name error<commit_after>fauxmongo
=========
Match MongoDB queries, apply updates and test aggregation pipelines on local documents.


Installation and Use
--------------------
```shell
$ npm install fauxmongo
```
```javascript
var fauxmongo = require ('fauxmongo');
fauxmongo.update (document, update);
fauxmongo.update (query, document, update);
var queryMatchesDoc = fauxmongo.matchQuery (document, query);
var aggregatedDocs = fauxmongo.aggregate (docs, pipeline);
// get the result set of each stage in an aggregation pipeline
var stageOutputs = fauxmongo.aggregate (docs, pipeline, true);
// recursively overwrite freshly-queried state to local object
fauxmongo.merge (update, state, query, projection);
```


Development
-----------
`fauxmongo` is developed and maintained by Kevin "Schmidty" Smith under the MIT license. If you want to
see continued development on `fauxmongo`, please help me [pay my bills!](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PN6C2AZTS2FP8&lc=US&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)


Tests
-----
The tests require a MongoDB instance to be accessible at the default host - `127.0.0.1:27017`. The
db/collection is `test-fauxmongo.test-fauxmongo` and all records created will be removed before the
tests finish.
{'fraction_non_alphanumeric': 0.12398921832884097, 'fraction_numerical': 0.014632268001540239, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1610180', 'n_tokens_mistral': 834, 'n_tokens_neox': 773, 'n_words': 261}