# @ungap/create-content

> A cross browser utility to create HTML or SVG runtime content

Latest version **0.3.1** (published 2021-01-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ungap/create-content
pnpm add @ungap/create-content
yarn add @ungap/create-content
bun add @ungap/create-content
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2021-01-14 |
| First published | 2018-11-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/ungap__create-content) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | HTMLTemplateElement, createContent, dom, utility, ungap |

## Links

- npm: https://www.npmjs.com/package/@ungap/create-content
- Repository: https://github.com/ungap/create-content
- Homepage: https://github.com/ungap/create-content#readme
- Issues: https://github.com/ungap/create-content/issues
- npm.io page: https://npm.io/package/@ungap/create-content

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2021-01-14
- 0.3.0 — 2021-01-14
- 0.2.0 — 2020-05-02
- 0.1.4 — 2018-12-16
- 0.1.3 — 2018-12-07
- 0.1.2 — 2018-12-07
- 0.1.1 — 2018-11-28
- 0.1.0 — 2018-11-27

## README

# createContent

[![Build Status](https://travis-ci.com/ungap/create-content.svg?branch=master)](https://travis-ci.com/ungap/create-content) [![Coverage Status](https://coveralls.io/repos/github/ungap/create-content/badge.svg?branch=master)](https://coveralls.io/github/ungap/create-content?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/ungap/create-content.svg)](https://greenkeeper.io/) ![WebReflection status](https://offline.report/status/webreflection.svg)

A cross browser utility to create HTML or SVG runtime content, as lightweight alternative to what a [HTMLTemplateElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement) polyfill could do through its `content` accessor.

  * CDN global utility via https://unpkg.com/@ungap/create-content
  * ESM via `import createContent from '@ungap/create-content'`
  * CJS via `const createContent = require('@ungap/create-content')`


### Example

```js
// createContent(markup[, type = 'html'[, normalize = false]])
const htmlContent = createContent('<td>any content</td>');
const svgContent = createContent('<rect x=1 y=2 />', 'svg');
```

[Live test](https://ungap.github.io/create-content/test/)

---
_Source: https://npm.io/package/@ungap/create-content · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
