<commit_before>#	Transformer Template System

## Usage:
<pre><code>
var Transformer = require('transformer')
var transformer = new Transformer
var myvars = {var1 : "Value1", var2: {field1: "Value 2"}}
var code = transformer.compile(input_text)
var output_text = transformer.execute(code, myvars)
</code></pre>

## Samples 
Samples are present in the file tests/tests.js which shows how to use various features of Transformer.
You can run the samples either by:
<pre><code>
node tests/tests.js OR
npm test transformer
</code></pre>

## License 
As described in LICENSE<commit_msg>added template sample in readme<commit_after>#	Transformer Template System

## Usage:
<pre><code>
var Transformer = require('transformer')
var transformer = new Transformer
var myvars = {var1 : "Value1", var2: {field1: "Value 2"}}
var code = transformer.compile(input_text)
var output_text = transformer.execute(code, myvars)
</code></pre>

## Samples 
Samples are present in the file tests/tests.js which shows how to use various features of Transformer.
You can run the samples either by:
<pre><code>
node tests/tests.js OR
npm test transformer
</code></pre>

# Sample template

To give an idea of how the transformer template looks, I have included a small example:
<pre><code>
<h1>{=page.title}
<h2>Order List</h2>

{set total=0}
<table>
<tr><th>Product</th><th>Price</th><Quantity</th></tr>
<tr>
{foreach from=orders item=order}
<tr>
<td>{=order.name}</td> <td> {= order.price|currency} </td> <td>{order.qty}</td>
</tr>
{set total=`order.price*order.qty+total`}
{/foreach}
<p>
Total price: {=total|currency}
</p>
</code></pre>


## License 
As described in LICENSE
{'fraction_non_alphanumeric': 0.14441747572815533, 'fraction_numerical': 0.00849514563106796, 'mean_word_length': 5.44140625, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 45, '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': '7159376', 'n_tokens_mistral': 559, 'n_tokens_neox': 536, 'n_words': 181}