# custom-html-tag

> ## usage ```html const html = new HTMLTag(); const span = document.createElement('span'); const template = html`$

Latest version **1.0.0** (published 2018-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install custom-html-tag
pnpm add custom-html-tag
yarn add custom-html-tag
bun add custom-html-tag
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-06-06 |
| First published | 2018-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | vandeurenglenn |
| Maintainers | vandeurenglenn |

## Links

- npm: https://www.npmjs.com/package/custom-html-tag
- Repository: https://github.com/vandeurenglenn/custom-html-tag
- Homepage: https://github.com/vandeurenglenn/custom-html-tag#readme
- Issues: https://github.com/vandeurenglenn/custom-html-tag/issues
- npm.io page: https://npm.io/package/custom-html-tag

## Recent versions

- 1.0.0 (latest) — 2018-06-06
- 0.2.0 — 2018-06-06
- 0.1.6 — 2018-05-28
- 0.1.5 — 2018-05-27
- 0.1.4 — 2018-05-27
- 0.1.3 — 2018-05-27
- 0.1.1 — 2018-05-25
- 0.1.0 — 2018-05-24

## README

# custom-html-tag

## usage
```html
<script src="node_modules/custom-html-tag/html.js"></script>
<script src="node_modules/custom-renderer/render.js"></script>
<script>
  const html = new HTMLTag();
  const span = document.createElement('span');
  const template = html`<p>${'variable'}</p>`;
  render(span, template, {variable: 'hello'}); // <p>hello</p>
  render(span, template, {variable: 'hello world'}); // <p>hello world</p>
  
  // or
  // without custom-renderer
  const templateResult = template({variable: 'hello'});
  templateResult.changes.forEach(change => {
    change.from.value // previous value
    change.from.position // previous position
    change.to.value // new value
    change.to.position // new position
    // check https://github.com/vandeurenglenn/custom-renderer for an working example.
  });
</script>
```

---
_Source: https://npm.io/package/custom-html-tag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
