0.1.10 • Published 6 months ago

get-tag v0.1.10

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

get-tag

Create HTML tag strings on the fly.

Installation

Install the package from npm:

npm install get-tag

Usage

const getTag = require('get-tag');

console.log(getTag('title', 'Some Title'));
// <title>Some Title</title>

console.log(getTag('a', 'Some Link', {href: 'foo.com'}));
// <a href="foo.com">Some link</a>

console.log(getTag('meta', null, {name: 'author', content: 'foo'}));
// <meta name="author" content="foo">

If the provided HTML tag name is included in the void-elements list, then selfClosing will be set to true.

0.1.10

6 months ago

0.1.8

12 months ago

0.1.9

12 months ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago