<commit_before>jquery-toattr
=============

jquery method that writes various properties like data, selected item, to their DOM counterpart<commit_msg>A little more README<commit_after>jquery-toattr
=============

jquery method that writes various properties like data, selectedIndex,
to their DOM counterpart.

It is useful for serializing a document now and resume operations later,
keeping the same state.


Usage
-----

```js
console.log($('<div/>').data('name', 'toto').toAttr().get(0).outerHTML);

```

Will print
```html
<div data-name="toto"></div>
```

Also a select with a selectedIndex=1 property:

```html
<select>
  <option value="1"/>
  <option value="2"/>
  <option value="3"/>
</select>
```

will become

```html
<select>
  <option value="1"/>
  <option value="2" selected="selected"/>
  <option value="3"/>
</select>
```
{'fraction_non_alphanumeric': 0.1875746714456392, 'fraction_numerical': 0.009557945041816009, 'mean_word_length': 4.985714285714286, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '3644920', 'n_tokens_mistral': 264, 'n_tokens_neox': 249, 'n_words': 84}