<commit_before># Custom element decorator
This package provides a simple (decorator)[https://github.com/wycats/javascript-decorators] for custom element classes, which automatically
checks for a valid name and registers the element in the DOM.

## Installation
```
npm install --save-dev rollup-plugin-babel
```

## Usage

### @component(componentname)
```js
import { customElement } from 'custom-element-decorator';

@customElement('super-component')
export default class TestComponent extends HTMLElement {

}
```
The given name ('super-component') will be checked for validity and the element gets registered as `document.registerElement('super-component', TestComponent)`

### @component()
You can also let the decorator guess the name of the component, if you omit the name parameter:
```js
import { customElement } from 'custom-element-decorator';

@customElement()
export default class SuperHotComponent extends HTMLElement {

}
/**
 * Element will be registered as
 * document.registerElement('super-hot-component', SuperHotComponent)
 */
```
## License
MIT
<commit_msg>[TASK] add travis ci badge<commit_after># Custom element decorator [![Build Status](https://travis-ci.org/Duske/custom-element-decorator.svg?branch=master)](https://travis-ci.org/Duske/custom-element-decorator)
This package provides a simple (decorator)[https://github.com/wycats/javascript-decorators] for custom element classes, which automatically
checks for a valid name and registers the element in the DOM.

## Installation
```
npm install --save-dev rollup-plugin-babel
```

## Usage

### @component(componentname)
```js
import { customElement } from 'custom-element-decorator';

@customElement('super-component')
export default class TestComponent extends HTMLElement {

}
```
The given name ('super-component') will be checked for validity and the element gets registered as `document.registerElement('super-component', TestComponent)`

### @component()
You can also let the decorator guess the name of the component, if you omit the name parameter:
```js
import { customElement } from 'custom-element-decorator';

@customElement()
export default class SuperHotComponent extends HTMLElement {

}
/**
 * Element will be registered as
 * document.registerElement('super-hot-component', SuperHotComponent)
 */
```
## License
MIT

{'fraction_non_alphanumeric': 0.11413748378728923, 'fraction_numerical': 0.0, 'mean_word_length': 5.687861271676301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3642960', 'n_tokens_mistral': 636, 'n_tokens_neox': 612, 'n_words': 214}