An open API service indexing awesome lists of open source software.

https://github.com/denomod/deno_html

Useful template literal tag for create html strings in ES2015+
https://github.com/denomod/deno_html

deno deno-mod deno-module deno-modules denomod

Last synced: 4 months ago
JSON representation

Useful template literal tag for create html strings in ES2015+

Awesome Lists containing this project

README

          

# deno_html

[![tag](https://img.shields.io/github/release/denomod/deno_html)](https://github.com/denomod/deno_html/releases)
[![Build Status](https://github.com/denomod/deno_html/workflows/ci/badge.svg?branch=master)](https://github.com/denomod/deno_html/actions)
[![license](https://img.shields.io/github/license/denomod/deno_html)](https://github.com/denomod/deno_html/blob/master/LICENSE)

Useful template literal tags for create html/css strings in ES2015+.

## Usage

```ts
import { html } from "https://deno.land/x/html/mod.ts";

let languages = ["Rust", "JavaScript", "TypeScript"];

const str = html`



    ${languages.map((x) => `
  • ${x}
  • `)}


`;

console.log(str);
```

Outputs:

```html



  • Rust

  • JavaScript

  • TypeScript



```

## Why not template literal?

![](./screen.png)

### License

[deno_html](https://github.com/denomod/deno_html) is released under the MIT
License. See the bundled [LICENSE](./LICENSE) file for details.