<commit_before># Exam.js

### You can use this library for examing something for something :)

### Compatibility

- IE9+, Edge, Chrome, Opera, Firefox, Safari
- Node.js

### Notes

- Entirely case insensitive for all arguments and results
- `exam()` Can take string or node element (object). Will examine all content within that element if it's node element.
- `.find()` Takes the array as argument. Can be reusable.
- within `.yep()`, `.nope()` and `.any()` callbacks you can access (return arrays only)
	- `this.filters` return filters you set
	- `this.found` return found words
	- `this.unfound` return unfound words

### Simple use

```js
exam(document.body)
	.find(['badword1', 'badword2', 'badword3']) 
	.yep( => {
		// Should use 'yep' only if something out there
	})
	.nope( => {
		// Should use 'nope' if nothing out there
	})
	.any( => {
		// Should use 'any' if you want just get 'found', 'unfound' and 'filters'
	})
```

### Reuse `.find()` method

**NB!** Will examine by different filters twice and independently  

```js
exam(document.body)
	.find(['badword1', 'badword2', 'badword3']) 
	.any( => {
		// we can reuse filters we set
		console.log(this.filters)
		// and be ready that these badwords we will find
		console.log(this.found)
	})
	.find(['copyright'])
	.yep( => {
		// copyright is out there
		console.log(this.found)
	})
```

Enjoy!<commit_msg>Edit readme<commit_after># Exam.js

### You can use this library for examing something for something :)

### Compatibility

- IE9+, Edge, Chrome, Opera, Firefox, Safari
- Node.js

### Notes

- Entirely case insensitive for all arguments and results
- `exam()` Can take string or node element (object). Will examine all content within that element if it's node element.
- `.find()` Takes the array as argument. Can be reusable.
- `.strictFind()` is the same as `find()`, but checks everything with regexp
- within `.yep()`, `.nope()` and `.any()` callbacks you will get entire 'result' object with
	- `filters` filters you set
	- `found` found words
	- `unfound` unfound words

### Simple use

```js
exam("Could you find my name here?")
	.find(["could"])
	.yep( result => {
		// Should use 'yep' only if
		// you expect something to be here
		console.log(result.found)
	})
	.nope( result => {
		// Should use 'nope' only if
		// you expect something not to be here
		console.log(result.unfound)
	})
	.any( result => {
		// Should use 'any' if
		// you don't know what to expect
		console.log(result)
	})
```

### Reuse methods

**NB!** Will examine by different filters twice and independently

```js
exam("How about that, huh?")
	.find(["abou"]) 
	.any( result => {
		// we can reuse filters we set
		console.log(result.filters)
		// and be ready that these badwords we will find
		console.log(result.found)
		// also we have all results within any of the callback
		console.log(result.unfound)
	})
	.strictFind(["about"])
	.yep( result => {
		// word 'about' is fully out there
		console.log(this.found)
	})
```

Enjoy!
{'fraction_non_alphanumeric': 0.14877967235038447, 'fraction_numerical': 0.0026746907388833165, 'mean_word_length': 3.4790419161676644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, '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': '4341966', 'n_tokens_mistral': 1041, 'n_tokens_neox': 973, 'n_words': 363}