<commit_before># A fork of [snabbdom-jsx](https://github.com/yelouafi/snabbdom-jsx) to facilitate the use of React-style JSX syntax with snabbdom.

One of the sticking points a colleague and I have been having with using snabbdom is the difference in notation between itself and React JSX. We wanted to be able to prove to the client that the pure components we were writing work the same as React. So this package blurs the lines between the two in the following ways:

- Rather than kebab-case event property names, use React-style camel-case
- Map React-specific properties, ie. `defaultValue`, back to a snabbdom equivalent
- Pass children as a prop instead of the second argument

This has allowed us to implement snabbdom for the build output, but also test our components with React tools such as [enzyme](https://github.com/airbnb/enzyme).

### Supported React event names

```
onCut onCopy onPaste
onKeyDown onKeyPress onKeyUp
onFocus onBlur onChange onInput onSubmit
onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop
onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp
onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart
onScroll onWheel
onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded 
```

The following is the original [snabbdom-jsx](https://github.com/yelouafi/snabbdom-jsx) documentation:

Write [Snabbdom](https://github.com/paldepind/snabbdom) virtual DOM with
[Babel's JSX](http://babeljs.io/docs/advanced/transformers/other/react/).

Snabbdom is a small Virtual DOM library. Unlike React, it's not a full View
 framework, it just focuses on the core virtual DOM problem : construct virtual DOM
 trees (virtual nodes) and patch the real DOM with them. it's entirely up to you
 to decide when those operations will happen. The main benefit is that you can adopt
 whatever architectural UI pattern you like in your application.

Babel is a JavaScript compiler that converts modern JavaScript (ES2015 and beyond)
into compatible JavaScript (ES5) code. A nice feature of Babel is that it supports
[React JSX  syntax](http://facebook.github.io/react/docs/displaying-data.html#jsx-syntax) and
in the same time allows you to take the result of this JSX (attributes + body) and do
whatever you like with it. Snabbdom-jsx transforms this JSX data into Snabbdom virtual nodes.

Features:

- Transforms Babel JSX templates into Snabbdom virtual nodes
- Straightforward mapping from JSX attributes to Snabbdom data attributes using namespaces
- JSX Components are simple functions `(attributes, children) => vnode`. No more messy classes.

Usage
======<commit_msg>readme changes<commit_after># A fork of [snabbdom-jsx](https://github.com/yelouafi/snabbdom-jsx) to facilitate the use of React-style JSX syntax with snabbdom.

One of the sticking points a colleague and I have been having with using snabbdom is the difference in notation between itself and React JSX. We wanted to be able to prove to the client that the pure components we were writing work the same as React. So this package blurs the lines between the two in the following ways:

- Rather than kebab-case event property names, use React-style camel-case
- Map React-specific properties, ie. `defaultValue`, back to a snabbdom equivalent
- Pass children as a prop instead of the second argument

This has allowed us to implement snabbdom for the build output, but also test our components with React tools such as [enzyme](https://github.com/airbnb/enzyme).

### Supported React event names

```
onCut onCopy onPaste
onKeyDown onKeyPress onKeyUp
onFocus onBlur onChange onInput onSubmit
onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop
onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp
onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart
onScroll onWheel
onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded 
```

### The following is the original [snabbdom-jsx](https://github.com/yelouafi/snabbdom-jsx) documentation:

Write [Snabbdom](https://github.com/paldepind/snabbdom) virtual DOM with
[Babel's JSX](http://babeljs.io/docs/advanced/transformers/other/react/).

Snabbdom is a small Virtual DOM library. Unlike React, it's not a full View
 framework, it just focuses on the core virtual DOM problem : construct virtual DOM
 trees (virtual nodes) and patch the real DOM with them. it's entirely up to you
 to decide when those operations will happen. The main benefit is that you can adopt
 whatever architectural UI pattern you like in your application.

Babel is a JavaScript compiler that converts modern JavaScript (ES2015 and beyond)
into compatible JavaScript (ES5) code. A nice feature of Babel is that it supports
[React JSX  syntax](http://facebook.github.io/react/docs/displaying-data.html#jsx-syntax) and
in the same time allows you to take the result of this JSX (attributes + body) and do
whatever you like with it. Snabbdom-jsx transforms this JSX data into Snabbdom virtual nodes.

Features:

- Transforms Babel JSX templates into Snabbdom virtual nodes
- Straightforward mapping from JSX attributes to Snabbdom data attributes using namespaces
- JSX Components are simple functions `(attributes, children) => vnode`. No more messy classes.

Usage
======
{'fraction_non_alphanumeric': 0.05622119815668203, 'fraction_numerical': 0.0018433179723502304, 'mean_word_length': 5.0490523968784835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, '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': '7671456', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1441, 'n_words': 695}