Package Exports
- get-tag
- get-tag/dist/get-tag.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-tag) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
get-tag
Create HTML tag strings on the fly.
Installation
Install the package from npm:
npm install get-tagUsage
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.