{"_id":"h","_rev":"13-7d2c74514cbade0a4d6a3c67e22806d9","name":"h","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"h","version":"0.0.0","author":{"url":"http://dominictarr.com","name":"'Dominic Tarr'","email":"dominic.tarr@gmail.com"},"license":"MIT","_id":"h@0.0.0","maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"homepage":"https://github.com/dominictarr/h","dist":{"shasum":"c4675e9481ff5b82a802bb240529e701707abb48","tarball":"https://registry.npmjs.org/h/-/h-0.0.0.tgz","integrity":"sha512-XlABBYJO0WEYRhT2pAIk1ZMufpIIV+1jqDxcJ/bXethWpPmNjSq+lNhqOQXwNHrKw0LP82eOvvtXwtc5uADJjA==","signatures":[{"sig":"MEQCIBTPk7mHnsBxJ3nNaKWppPjpG4O3ujerjxmDn0bO1c4SAiAiiw9l9qYTwKo4EmTs2JlJjN5FL11WNrMZJnYYNf36pg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"scripts":{"test":"tap test"},"repository":{"url":"git://github.com/dominictarr/h.git","type":"git"},"description":"## License","directories":{},"dependencies":{},"devDependencies":{"tap":"0.3.0"}},"0.1.0":{"name":"h","version":"0.1.0","author":{"url":"http://dominictarr.com","name":"'Dominic Tarr'","email":"dominic.tarr@gmail.com"},"license":"MIT","_id":"h@0.1.0","maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"homepage":"https://github.com/dominictarr/h","dist":{"shasum":"24211fe1d9cef2b36cae8ff8255606ea12ecdfb5","tarball":"https://registry.npmjs.org/h/-/h-0.1.0.tgz","integrity":"sha512-Qp+CHYcn9u3oY7cA3mTbPzcgNETC8St0k+WJtj4a38cm9omvJVmPwvZVoj/Sl3ssyFZ5aIhm581PUNM511u23g==","signatures":[{"sig":"MEQCICh+WOOKsZuQ2TD6JEIJMq3vczW5Vmcly0Caj9iprERjAiBT0r2wjddr1d+ZvUKZFQDzP+9MhrJxbVc0kkc6plaRmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"scripts":{"test":"tap test"},"repository":{"url":"git://github.com/dominictarr/h.git","type":"git"},"description":"generate HTML from javascript the easy way.","directories":{},"dependencies":{},"devDependencies":{"tap":"0.3.0"}},"1.0.0":{"name":"h","version":"1.0.0","author":{"name":"'Dominic Tarr' @EMovhfIrFk4NihAKnRNhrfRaqIhBv1Wj8pTxJNgvCCY=.ed25519"},"license":"MIT","_id":"h@1.0.0","maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"homepage":"https://github.com/dominictarr/h","bugs":{"url":"https://github.com/dominictarr/h/issues"},"dist":{"shasum":"a637773a89b3c07d316bdbda87d4a65b2a5f8cf4","tarball":"https://registry.npmjs.org/h/-/h-1.0.0.tgz","fileCount":7,"integrity":"sha512-nxC1orTrM/gMBsMyWnFqLe2kzqD/iVIVoBIdpOtQc9hyKzWWPuuCiXGwi0o3TwC+3SyhIR5d73WGg6KlcokWzw==","signatures":[{"sig":"MEQCIDeGCcO/+Tto2pqieHcX2ZpHcN5GzqVNS/DjfX7zB3HKAiBYrLFa0gxRB7K+/oyV2VCqpQyp4/6X+d4h+I/tKNORcQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMg9kCRA9TVsSAnZWagAAiwMP/irNcAcbOsa4fkKfLU6o\nB0IwEHWN7U5rdQ/g8u2BA41mWLHwQOmvttHSnkUyRYXQ7a5DclgBEU3SLo4l\niqf+lDb1uXH68U4k929UcfuQ+MZa6GgcJhlvUoAW45Mp/Aj1u/5eDrHE/NYB\nXadvHgNLgiKHOoWhDxAUagkBm8PigK1hWYPAq8BayIraUoAUUBfhyh9cZqRm\nQhtSjQqgOKpjHFesJEmlyf3WYtSamgisXxBmh8XVSHyWI0Z7VHDgq8ESn+XX\nRwBzvCNuohrEtSO4i4jdhQLFn26gyGL6B+uK4tAZQSEswfwupxYJBP/f4IOq\nFtDaUjyDSxohLz4fgzxgrWhZiKHTfLasehL4HeLvsvcZnkOmR7IqLsoOEiuu\nGdxE/CwvpzSFhkGHU+VS52l2YEMbfcUye+1a0GhQqBs/XCalmWZL3QI+g56E\nAAGf7wiUukiK7OnvSpZfLmFCkUynhV5Q24cswzo/OlpJ8G2EGWwV53eYE8UN\nNum5nXs55xlGF1TDWGeTrRA+sGAdzlx07XIm/YrWdtJ1T+z9aHF86i1mrLKy\n0X0zAtYiGAu0CvX/TSvrCisEVo2fN2ojfxnCaGCEXoIvOVhRX/vV9a9MCHkl\necvZAIvsNWOMIkG9QQDC+O3Mj62hMGO/K/cMM/Gkiqu7e7fhrDtWO55Ro5A9\nQCY+\r\n=/DnC\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"9bd25f461244ee600bf8f94018dfd6115378a044","scripts":{"test":"tape test/*.js"},"_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"repository":{"url":"git://github.com/dominictarr/h.git","type":"git"},"_npmVersion":"6.9.0","description":"generate HTML from javascript array structures","directories":{},"_nodeVersion":"8.15.0","dependencies":{"cssesc":"^3.0.0","html-escape":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.11.0","hyperscript":"^2.0.2"},"_npmOperationalInternal":{"tmp":"tmp/h_1.0.0_1563561827736_0.05959383746678726","host":"s3://npm-registry-packages"}}},"time":{"created":"2012-08-20T16:33:09.932Z","modified":"2025-10-13T17:10:10.164Z","0.0.0":"2012-08-20T16:33:13.637Z","0.1.0":"2012-08-22T15:50:10.260Z","1.0.0":"2019-07-19T18:43:47.841Z"},"bugs":{"url":"https://github.com/dominictarr/h/issues"},"author":{"name":"'Dominic Tarr' @EMovhfIrFk4NihAKnRNhrfRaqIhBv1Wj8pTxJNgvCCY=.ed25519"},"license":"MIT","homepage":"https://github.com/dominictarr/h","repository":{"url":"git://github.com/dominictarr/h.git","type":"git"},"description":"generate HTML from javascript array structures","maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"readme":"# h\n\ngenerate HTML from javascript array structures\n\nlike hyperscript but with arrays instead of functions.\nruns easily on the server and web workers, without a HtmlElement polyfil.\n\n## Example\n\n``` js\n\nvar toHTML = require('h')\n\ntoHTML(\n  ['div#page',\n    ['div#header',\n      ['h1.classy', 'h')),\n    ['div#menu', { style: 'float: left, width: 200px' } },\n      ['ul',\n        ['li', 'one'],\n        ['li', 'two'],\n        ['li', 'three']]],\n    ['div#content', {style: 'float: left;' },\n      ['h2', 'content title'],\n      ['p', \n        \"so it's just like a templating engine,\\n\",\n        \"but easy to use inline with javascript\\n\"],\n      ['p', \n        \"the intension is for this to be used to create\\n\",\n        \"reusable, interactive html widgets. \"]]]\n)\n\n```\n\n## toHTML (ary)\n\nCreate some html from an array structure.\nIf the first element in the array is a string, that's the tag name.\nif it is an array of arrays, each item is mapped through `toHTML`\nand the results are concatenated.\n\n### classes & id\n\nIf the tag name is of form `name.class1.class2#id` that is a short cut\nfor setting the class and id.\n\n### attributes\n\nIf an `{}` object is passed in, it's values will be used to set attributes.\n\n``` js\nh('a', {href: 'https://npm.im/h'}, 'h')\n```\n\nhtml attributes names must be alphanumeric but may have hypens.\nattribute values will be escaped with `html-escape`.\n\n### innerHTML: non-escaped html content.\n\nsometimes it is necessary to output non-escaped html,\nfor example, rendered markdown, or the output of another templating library.\nto do this, use the `{innerHTML:html}` attribute. Note, this will cause any\nfollowing children to be ignored.\n\n### children - string\n\nIf an argument is a string, it will be escaped with `html-escape`\n\n### children - null.\n\nThis is just ignored.\n\n### children - Array\n\nEach item in the array is treated like a ordinary child. (string or HTMLElement)\nthis is uesful when you want to iterate over an object:\n\n```\n['table',\n  Object.keys(obj).map(function (k) {\n    return ['tr'\n      ['th', k],\n      ['td', obj[k]]\n    ]\n  }]\n\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","users":{}}