<commit_before>Filtrex
=======

A simple, safe, JavaScript expression engine, allowing end-users to enter arbitrary expressions without p0wning you.

Why?
----

There are many cases where you want a user to be able enter an arbitrary expression through a user interface. e.g.

*   Filter/searching across items using multiple fields
*   Colorize items based on values<commit_msg>Example expression<commit_after>Filtrex
=======

A simple, safe, JavaScript expression engine, allowing end-users to enter arbitrary expressions without p0wning you.

````python
category == 'meal' and (calories * weight > 2000.0 or type in ("cake", "pie"))
````

Why?
----

There are many cases where you want a user to be able enter an arbitrary expression through a user interface. e.g.

*   Filter/searching across items using multiple fields
*   Colorize items based on values
{'fraction_non_alphanumeric': 0.08847497089639116, 'fraction_numerical': 0.008149010477299184, 'mean_word_length': 4.375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '581338', 'n_tokens_mistral': 233, 'n_tokens_neox': 220, 'n_words': 110}