{"_id":"create-html-element","_rev":"1272108","name":"create-html-element","description":"Create a HTML element string","dist-tags":{"latest":"4.0.1"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-10-17T19:00:58.000Z","created":"2017-06-17T19:17:53.136Z","4.0.1":"2021-10-17T18:59:16.651Z","4.0.0":"2021-10-13T17:32:50.736Z","3.0.0":"2019-05-21T05:12:20.727Z","2.1.0":"2019-04-09T05:46:04.164Z","2.0.0":"2018-05-01T14:17:13.633Z","1.0.0":"2017-06-17T19:17:53.136Z"},"users":{"rocket0191":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/create-html-element.git"},"versions":{"4.0.1":{"name":"create-html-element","version":"4.0.1","description":"Create a HTML element string","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/create-html-element.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["html","element","create","document","string","make","tag"],"dependencies":{"escape-goat":"^4.0.0","html-tags":"^3.1.0","stringify-attributes":"^3.0.0","type-fest":"^2.5.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.45.0"},"gitHead":"9c4b4592ae11a33d2b1070ba5e0d2db6587b1905","bugs":{"url":"https://github.com/sindresorhus/create-html-element/issues"},"homepage":"https://github.com/sindresorhus/create-html-element#readme","_id":"create-html-element@4.0.1","_nodeVersion":"14.17.5","_npmVersion":"7.20.3","dist":{"shasum":"037197116084de7822c7259f426ab53f38efa1a9","size":2152,"noattachment":false,"key":"/create-html-element/-/create-html-element-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-html-element/download/create-html-element-4.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-html-element_4.0.1_1634497156524_0.25716772001557286"},"_hasShrinkwrap":false,"publish_time":1634497156651,"_cnpm_publish_time":1634497156651},"4.0.0":{"name":"create-html-element","version":"4.0.0","description":"Create a HTML element string","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/create-html-element.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["html","element","create","document","string","make","tag"],"dependencies":{"escape-goat":"^4.0.0","html-tags":"^3.1.0","stringify-attributes":"^3.0.0","type-fest":"^2.5.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.45.0"},"gitHead":"3fc7273e3118e23980eed984b83c7a3ac7603697","bugs":{"url":"https://github.com/sindresorhus/create-html-element/issues"},"homepage":"https://github.com/sindresorhus/create-html-element#readme","_id":"create-html-element@4.0.0","_nodeVersion":"14.17.5","_npmVersion":"7.20.3","dist":{"shasum":"30184b61020396ed35c709f04c8fc9454d564a8a","size":2144,"noattachment":false,"key":"/create-html-element/-/create-html-element-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-html-element/download/create-html-element-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-html-element_4.0.0_1634146370559_0.4400952245502938"},"_hasShrinkwrap":false,"publish_time":1634146370736,"_cnpm_publish_time":1634146370736},"3.0.0":{"name":"create-html-element","version":"3.0.0","description":"Create a HTML element string","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/create-html-element.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["html","element","create","document","string","make","tag"],"dependencies":{"escape-goat":"^2.0.0","html-tags":"^3.0.0","stringify-attributes":"^2.0.0","type-fest":"^0.5.1"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.3","xo":"^0.24.0"},"gitHead":"5b2ad1154ca77e759e5782dbde14adb761e057d6","bugs":{"url":"https://github.com/sindresorhus/create-html-element/issues"},"homepage":"https://github.com/sindresorhus/create-html-element#readme","_id":"create-html-element@3.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"ff849781d0f2ecb1c3e92237d91c853ca2e6b57c","size":2216,"noattachment":false,"key":"/create-html-element/-/create-html-element-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-html-element/download/create-html-element-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-html-element_3.0.0_1558415540512_0.8854080974560798"},"_hasShrinkwrap":false,"publish_time":1558415540727,"_cnpm_publish_time":1558415540727},"2.1.0":{"name":"create-html-element","version":"2.1.0","description":"Create a HTML element string","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/create-html-element.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["html","element","create","el","document","string","make","tag"],"dependencies":{"escape-goat":"^1.3.0","html-tags":"^2.0.0","stringify-attributes":"^1.0.0","type-fest":"^0.3.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"1a4deb1b34276dc17ee58fc8c60b4ca5a41c800c","bugs":{"url":"https://github.com/sindresorhus/create-html-element/issues"},"homepage":"https://github.com/sindresorhus/create-html-element#readme","_id":"create-html-element@2.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"916b28a1f0bf716adfdee74abed05e7b66714bea","size":2244,"noattachment":false,"key":"/create-html-element/-/create-html-element-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-html-element/download/create-html-element-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-html-element_2.1.0_1554788763993_0.5530169949369759"},"_hasShrinkwrap":false,"publish_time":1554788764164,"_cnpm_publish_time":1554788764164},"2.0.0":{"name":"create-html-element","version":"2.0.0","description":"Create a HTML element string","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/create-html-element.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["html","element","create","el","document","string","make","tag"],"dependencies":{"escape-goat":"^1.3.0","html-tags":"^2.0.0","stringify-attributes":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"99828e78dbe19232c0174166958b9a5d723e7c3d","bugs":{"url":"https://github.com/sindresorhus/create-html-element/issues"},"homepage":"https://github.com/sindresorhus/create-html-element#readme","_id":"create-html-element@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0f51aaff7952b83d36428f01e6b3f263d3c0f328","size":1962,"noattachment":false,"key":"/create-html-element/-/create-html-element-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-html-element/download/create-html-element-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-html-element_2.0.0_1525184233536_0.11718841640823108"},"_hasShrinkwrap":false,"publish_time":1525184233633,"_cnpm_publish_time":1525184233633},"1.0.0":{"name":"create-html-element","version":"1.0.0","description":"Create a HTML element string","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/create-html-element.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["html","element","create","el","document","string","make","tag"],"dependencies":{"html-tags":"^2.0.0","stringify-attributes":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"4aee637886e064d563dc9d9ccf0b8f64c6f2ec64","bugs":{"url":"https://github.com/sindresorhus/create-html-element/issues"},"homepage":"https://github.com/sindresorhus/create-html-element#readme","_id":"create-html-element@1.0.0","_shasum":"df8863932dc60565ca5b71b0b7b2b3d91f10438f","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"df8863932dc60565ca5b71b0b7b2b3d91f10438f","size":1772,"noattachment":false,"key":"/create-html-element/-/create-html-element-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/create-html-element/download/create-html-element-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-html-element-1.0.0.tgz_1497727072177_0.664513181662187"},"directories":{},"publish_time":1497727073136,"_hasShrinkwrap":false,"_cnpm_publish_time":1497727073136}},"readme":"# create-html-element\n\n> Create a HTML element string\n\n## Install\n\n```sh\nnpm install create-html-element\n```\n\n## Usage\n\n```js\nimport createHtmlElement from 'create-html-element';\n\ncreateHtmlElement({\n\tname: 'h1',\n\tattributes: {\n\t\tclass: 'unicorn',\n\t\trainbow: true,\n\t\thorse: false,\n\t\tnumber: 1,\n\t\tmultiple: [\n\t\t\t'a',\n\t\t\t'b'\n\t\t]\n\t},\n\thtml: '????'\n});\n//=> '<h1 class=\"unicorn\" rainbow number=\"1\" multiple=\"a b\">????</h1>'\n\ncreateHtmlElement({text: 'Hello <em>World</em>'});\n//=> '<div>Hello &lt;em&gt;World&lt;/em&gt;</div>'\n```\n\n## API\n\n### createHtmlElement(options)\n\n#### options\n\nType: `object`\n\n##### name\n\nType: `string`\\\nDefault: `'div'`\n\nHTML tag name.\n\n##### attributes\n\nType: `object`\n\nHTML tag attributes.\n\n##### html\n\nHTML tag value in unescaped HTML.\n\nThis option is mutually exclusive with the `text` option.\n\n##### text\n\nHTML tag value in escaped HTML.\n\nThis option is mutually exclusive with the `html` option.\n\n## Related\n\n- [stringify-attributes](https://github.com/sindresorhus/stringify-attributes) - Turn an object into a string of HTML attributes\n","_attachments":{},"homepage":"https://github.com/sindresorhus/create-html-element#readme","bugs":{"url":"https://github.com/sindresorhus/create-html-element/issues"},"license":"MIT"}