<commit_before># Synopsis 

Transparency is a (client-side) template engine which binds data to DOM with zero configuration. Just call `.render(data)`.

```html
<div id="template">
  <span class="greeting"></span>
  <span class="name"></span>
</div>
```
```js
var hello = {
  greeting: 'Hello',
  name:     'world!'
};

$('#template').render(hello);
```
```html
<div id="template">
  <span class="greeting">Hello</span>
  <span class="name">world!</span>
</div>
```

## Features

* Data binding by convention - No extra markup in the views
* Collection rendering - No loops and partials
* Nested objects and collections - No configuration, just conventions
* Directives - No custom DSL, just functions
* Template caching - No manual template lookup/compilation/rendering
* Fast - In most real-world cases, it's faster than any other template engine or hand-crafted bindings (*)
* Compatible - Tested on IE6+, Chrome and Firefox

(*) Take with a grain of salt, as "real-world performance" isn't that easy to define or measure. Anyway,
[jsperf.com](http://jsperf.com/dom-vs-innerhtml-based-templating/366) should give you an idea. 
If interested, see other performance tests at `browser` folder. See also 
[Frequently asked questions](https://github.com/leonidas/transparency/wiki/Frequently-Asked-Questions).

## Try it

[Demo website](http://leonidas.github.com/transparency/) with interactive examples.

## Use it

Install with `npm install transparency` or get the 
[compiled and minified version](https://raw.github.com/leonidas/transparency/master/lib/transparency.min.js)
and include it to your application. jQuery is optional, but if you happen to use it, Transparency registers itself 
as a plugin.

```html
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/transparency.min.js"></script>
```

For server-side use, see `spec` folder and the awesome [jsdom](https://github.com/tmpvar/jsdom) for the details.

## Examples

### Assigning values<commit_msg>Add list of performance test cases at jsperf.com<commit_after># Synopsis 

Transparency is a (client-side) template engine which binds data to DOM with zero configuration. Just call `.render(data)`.

```html
<div id="template">
  <span class="greeting"></span>
  <span class="name"></span>
</div>
```
```js
var hello = {
  greeting: 'Hello',
  name:     'world!'
};

$('#template').render(hello);
```
```html
<div id="template">
  <span class="greeting">Hello</span>
  <span class="name">world!</span>
</div>
```

## Features

* Data binding by convention - No extra markup in the views
* Collection rendering - No loops and partials
* Nested objects and collections - No configuration, just conventions
* Directives - No custom DSL, just functions
* Template caching - No manual template lookup/compilation/rendering
* Fast - In most real-world cases, it's faster than any other template engine or hand-crafted bindings (*)
* Compatible - Tested on IE6+, Chrome and Firefox

(*) Take with a grain of salt, as "real-world performance" isn't that easy to define or measure. Anyway, jsperf.com
should give an idea:  
http://jsperf.com/transparency-vs-handlebars-finite-list/3  
http://jsperf.com/transparency-vs-handlebars-infinite-list/3  
http://jsperf.com/dom-vs-innerhtml-based-templating/366


If interested, see other performance tests at `browser` folder. See also 
[Frequently asked questions](https://github.com/leonidas/transparency/wiki/Frequently-Asked-Questions).

## Try it

[Demo website](http://leonidas.github.com/transparency/) with interactive examples.

## Use it

Install with `npm install transparency` or get the 
[compiled and minified version](https://raw.github.com/leonidas/transparency/master/lib/transparency.min.js)
and include it to your application. jQuery is optional, but if you happen to use it, Transparency registers itself 
as a plugin.

```html
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/transparency.min.js"></script>
```

For server-side use, see `spec` folder and the awesome [jsdom](https://github.com/tmpvar/jsdom) for the details.

## Examples

### Assigning values
{'fraction_non_alphanumeric': 0.13386978785662035, 'fraction_numerical': 0.003901487442087296, 'mean_word_length': 4.596180081855389, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 6, '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': '153300', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1217, 'n_words': 414}