{"_id":"html-tag","_rev":"16-dfb8877003c63a7d48508ff6ff2f65af","name":"html-tag","description":"Generate HTML elements from a javascript object.","dist-tags":{"latest":"2.0.0"},"versions":{"0.1.0":{"name":"html-tag","description":"Generate HTML tags from JSON.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/html-tag","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/html-tag.git"},"bugs":{"url":"https://github.com/jonschlinkert/html-tag/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/html-tag/blob/master/LICENSE-MIT"}],"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb":"~0.2.6","chai":"~1.9.1","mocha":"*"},"_id":"html-tag@0.1.0","_shasum":"327301ec9743d1c15ecdcf62a2ddd880d52a6dcf","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"327301ec9743d1c15ecdcf62a2ddd880d52a6dcf","tarball":"https://registry.npmjs.org/html-tag/-/html-tag-0.1.0.tgz","integrity":"sha512-aDzxxrZBnWtf607aH3shxbv6Wbxy55VVXMH9Oe3BecyAaNhhnaKXLGgTH1XbBV+Nh9aHg2s9WnBrsi8TJO8pNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGaU+9btN3RihFEoShUmHgFkhQyEiP6slHld7Amq3CeWAiBQjGnTymEOZNbsz4Gkm5ZzKael7qYGd2sIDqsiNj1Gsw=="}]}},"0.1.1":{"name":"html-tag","description":"Generate HTML tags from JSON.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/html-tag","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/html-tag.git"},"bugs":{"url":"https://github.com/jonschlinkert/html-tag/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/html-tag/blob/master/LICENSE-MIT"}],"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"chai":"~1.9.1","mocha":"*","verb":"~0.2.6","verb-tag-jscomments":"^0.1.2"},"_id":"html-tag@0.1.1","_shasum":"a9737076c68bec660b7730c92a34cf34db89c37e","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"a9737076c68bec660b7730c92a34cf34db89c37e","tarball":"https://registry.npmjs.org/html-tag/-/html-tag-0.1.1.tgz","integrity":"sha512-8nGboTCLDuL8JtLZpSr71O+hXFEX77fuXOEgELZZl5jZjuWN8c3pigAdcvcBh/jm2/Ousc4eUCDtD9cTaUjsPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFg+ZDdr/y3IThvZk96mo6fsdj/oz4AkO6P4V5O8TEVGAiADsxpwCgz/KRH5zRYPCtnWzPnUuliIWkiUGu5j6qNrUw=="}]}},"0.2.0":{"name":"html-tag","description":"Generate HTML tags from JSON.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/html-tag","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/html-tag.git"},"bugs":{"url":"https://github.com/jonschlinkert/html-tag/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/html-tag/blob/master/LICENSE-MIT"}],"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"chai":"~1.9.1","mocha":"*","verb":"~0.2.6","verb-tag-jscomments":"^0.1.2"},"_id":"html-tag@0.2.0","_shasum":"b146fa2fe8df74d0add350881686c355547aed11","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"b146fa2fe8df74d0add350881686c355547aed11","tarball":"https://registry.npmjs.org/html-tag/-/html-tag-0.2.0.tgz","integrity":"sha512-isVfqaxwr0x+W4r1la7qiEPbuWwKPjyhDb6jenU7ni9S7XIlTYwjGwRb7r6zS27KArcSIVbr0FehAYf6fHNo1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBv/V9sdWhnbbefrBSmSl4U0YbUxf99QPC4XjrYsf9qkAiBgZe9qMrqI/tB+cFGYdZZsSXWbK29t2gYUkYVhIfYJLw=="}]}},"0.2.1":{"name":"html-tag","description":"Generate HTML tags from JSON.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/html-tag","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/html-tag.git"},"bugs":{"url":"https://github.com/jonschlinkert/html-tag/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/html-tag/blob/master/LICENSE-MIT"}],"keywords":["attr","attribute","attributes","create","ele","element","elements","generate","handlebars","helper","helpers","href","html","src","tag","template","url"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"chai":"~1.9.1","mocha":"*","verb":"~0.2.6","verb-tag-jscomments":"^0.1.2"},"_id":"html-tag@0.2.1","_shasum":"af48e0de4768bd14e89d85e73e067041e2074722","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"af48e0de4768bd14e89d85e73e067041e2074722","tarball":"https://registry.npmjs.org/html-tag/-/html-tag-0.2.1.tgz","integrity":"sha512-dRv4EouLqLRkbpBNps3mjZV+nIlKT116zxQcbrRNAeY8PM06NEHMJnscLZdhbM/Of6gwC26z/DmkCghJlHIttg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpSK1Z4VoMI6TlO3EYQN6O1EdAk+Ek/7RDiKsnm6IzBQIgU852m0a/kOEX8adxlcjnTlvlLWIbCuRTyRBwFE3Sm10="}]}},"1.0.0":{"name":"html-tag","description":"Generate HTML elements from a javascript object.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/html-tag","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/html-tag.git"},"bugs":{"url":"https://github.com/jonschlinkert/html-tag/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"isobject":"^3.0.0","void-elements":"^2.0.1"},"devDependencies":{"gulp-format-md":"^0.1.11","mocha":"^3.2.0"},"keywords":["attr","attribute","attributes","create","ele","element","elements","generate","handlebars","helper","helpers","href","html","src","tag","template","url"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"related":{"list":[]},"reflinks":["verb","verb-generate-readme"]},"gitHead":"3ab2933f441ef67f8964d3440d3a47cdd1a8bc5c","_id":"html-tag@1.0.0","_shasum":"95e5612aec82bea928ed44595f854145e9f7e0b5","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"},{"name":"doowb","email":"brian.woodward@gmail.com"}],"dist":{"shasum":"95e5612aec82bea928ed44595f854145e9f7e0b5","tarball":"https://registry.npmjs.org/html-tag/-/html-tag-1.0.0.tgz","integrity":"sha512-SXjQ8wG7dh1fIxT/lhj+nKcc2R0rEmMGjvw2Bh46IkijhEaVdEteqYGBFZiICXkUra3PHLy+4zoXwDhh0l55SQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlGlNC0ZTDyQb1N/GqgTC9S/+fxgJ6aO1PpfFFrDkYJwIhANtNcHmEoGL5O5jLyu2yT6jG39zp1c4FVTbjQBIpIPyL"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/html-tag-1.0.0.tgz_1483862695762_0.09857775969430804"}},"2.0.0":{"name":"html-tag","description":"Generate HTML elements from a javascript object.","version":"2.0.0","homepage":"https://github.com/jonschlinkert/html-tag","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/html-tag.git"},"bugs":{"url":"https://github.com/jonschlinkert/html-tag/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"is-self-closing":"^1.0.1","kind-of":"^6.0.0"},"devDependencies":{"gulp-format-md":"^1.0.0","mocha":"^3.2.0"},"keywords":["attr","attribute","attributes","create","ele","element","elements","generate","handlebars","helper","helpers","href","html","src","tag","template","url"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["breakdance","html-toc","is-self-closing","remarkable","self-closing-tags"]},"lint":{"reflinks":true}},"gitHead":"def8f22908c98ede7932401eb3b0515ac1fb363f","_id":"html-tag@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"integrity":"sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g==","shasum":"36c3bc8d816fd30b570d5764a497a641640c2fed","tarball":"https://registry.npmjs.org/html-tag/-/html-tag-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSiXiUT85mGF7wtLElBwOuKDVr1l1oJN8tMFipxism8gIhALcIUMONUF4Yv0ORaWKR8vXzwZAGOrUQ7lbP5hGKJYj4"}]},"maintainers":[{"email":"brian.woodward@gmail.com","name":"doowb"},{"email":"github@sellside.com","name":"jonschlinkert"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-tag-2.0.0.tgz_1509511877053_0.3173230381216854"}}},"readme":"# html-tag [![NPM version](https://img.shields.io/npm/v/html-tag.svg?style=flat)](https://www.npmjs.com/package/html-tag) [![NPM monthly downloads](https://img.shields.io/npm/dm/html-tag.svg?style=flat)](https://npmjs.org/package/html-tag) [![NPM total downloads](https://img.shields.io/npm/dt/html-tag.svg?style=flat)](https://npmjs.org/package/html-tag) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/html-tag.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/html-tag)\n\n> Generate HTML elements from a javascript object.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save html-tag\n```\n\nOriginally inspired by an HTML helper in hexo by [Tommy Chen](https://github.com/tommy351).\n\n## Usage\n\n```js\nvar tag = require('html-tag');\ntag(name[, attribs, text]);\n```\n\n**Params**\n\n* `tag` **{String}**: Name of the tag to create.\n* `attribs` **{Object}**: Optional attributes\n* `text` **{String|Boolean}**: Optional text\n* `returns` **{String}**: string of HTML\n\n**Examples**\n\n```js\nconsole.log(tag('a', {href: 'https://sellside.com'}, 'Sellside'));\n//=> <a href=\"https://sellside.com\">Sellside</a>\n\nconsole.log(tag('a', {id: 'anchor'}));\n//=> <a id=\"anchor\"></a>\n\nconsole.log(tag('strong', 'Let\\'s dance!'));\n//=> <strong>Let's dance</strong>\n\nconsole.log(tag('div'));\n//=> <div></div>\n```\n\n**Void elements (self-closing tags)**\n\n```js\nconsole.log(tag('img', {src: 'foo.jpg'}));\n//=> <img src=\"foo.jpg\">\n\nconsole.log(tag('br'));\n//=> <br>\n\nconsole.log(tag('br', '\\nfoo'));\n//=> <br>\\nfoo\n```\n\nForce a tag to _not render_ the closing tag by passing boolean `false` as the last argument (this is sometimes necessary with XML implementations).\n\n```js\nconsole.log(tag('P', 'Some random text...', false));\n//=> <P>Some random text...\n\nconsole.log(tag('P', false));\n//=> <P>\n```\n\n**Boolean attributes**\n\nBoolean attributes are defined by defining the attribute with a boolean value (strictly `true` or strictly `false`)\n\n```js\nconsole.log(tag('details', {open: true}));\n//=> <details open></details>\n\nconsole.log(tag('details', {open: false}));\n//=> <details></details>\n\nconsole.log(tag('details', {open: 'false'}));\n//=> <details open=\"false\"></details>\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [breakdance](https://www.npmjs.com/package/breakdance): Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy… [more](http://breakdance.io) | [homepage](http://breakdance.io \"Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy to use. It's time for your markup to get down.\")\n* [html-toc](https://www.npmjs.com/package/html-toc): Generate a HTML table of contents using cheerio. | [homepage](https://github.com/jonschlinkert/html-toc \"Generate a HTML table of contents using cheerio.\")\n* [is-self-closing](https://www.npmjs.com/package/is-self-closing): Returns true if the given name is a HTML void element or common SVG self-closing… [more](https://github.com/jonschlinkert/is-self-closing) | [homepage](https://github.com/jonschlinkert/is-self-closing \"Returns true if the given name is a HTML void element or common SVG self-closing element.\")\n* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable \"Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.\")\n* [self-closing-tags](https://www.npmjs.com/package/self-closing-tags): HTML void elements are not the only self-closing tags. This includes common SVG self-closing elements… [more](https://github.com/jonschlinkert/self-closing-tags) | [homepage](https://github.com/jonschlinkert/self-closing-tags \"HTML void elements are not the only self-closing tags. This includes common SVG self-closing elements as well.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._","maintainers":[{"email":"brian.woodward@gmail.com","name":"doowb"},{"email":"github@sellside.com","name":"jonschlinkert"}],"time":{"modified":"2022-06-18T21:57:23.793Z","created":"2014-06-06T08:04:28.801Z","0.1.0":"2014-06-06T08:04:28.801Z","0.1.1":"2014-06-06T08:07:33.552Z","0.2.0":"2014-08-21T09:23:09.758Z","0.2.1":"2014-08-21T09:43:23.420Z","1.0.0":"2017-01-08T08:04:58.001Z","2.0.0":"2017-11-01T04:51:17.957Z"},"homepage":"https://github.com/jonschlinkert/html-tag","keywords":["attr","attribute","attributes","create","ele","element","elements","generate","handlebars","helper","helpers","href","html","src","tag","template","url"],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/html-tag.git"},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"bugs":{"url":"https://github.com/jonschlinkert/html-tag/issues"},"readmeFilename":"README.md","license":"MIT","users":{"masterde":true}}