{"name":"dom-lite","version":"23.2.1","description":"A small DOM implementation for server-side","license":"MIT","author":{"name":"Lauri Rooden","email":"lauri@rooden.ee"},"keywords":["document","dom","DOMParser","XMLSerializer","litejs"],"scripts":{"test":"c8 -r lcov -r text-summary --check-coverage --100 lj test --brief test/index.js && jshint *.js"},"repository":{"type":"git","url":"git+https://github.com/litejs/dom-lite.git"},"bugs":{"url":"https://github.com/litejs/dom-lite/issues"},"devDependencies":{"@litejs/cli":"23.2.0","c8":"7.12.0","jshint":"2.13.6"},"litejs":{"build":false,"global":false},"jshintConfig":{"esversion":5,"asi":true,"evil":true,"laxcomma":true,"maxdepth":6,"node":true,"nonbsp":true,"undef":true,"unused":true,"shadow":"outer","quotmark":"double"},"gitHead":"b24e6a93df81ac0f4ea30c73f13d7180394c834d","homepage":"https://github.com/litejs/dom-lite#readme","_id":"dom-lite@23.2.1","_nodeVersion":"19.5.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-8mXpwhL2oPxOK5UGNCHHFynrTpHwaCIauSoFakw+44IqeEyqm+XMHKrG74OsakcgHXsg6UhApr6/akT5v2QLYw==","shasum":"4d2a445b7470288feae285b12321818ce4ea0728","tarball":"http://registry-npm.ywwl.com/dom-lite/download/dom-lite-23.2.1.tgz","fileCount":6,"unpackedSize":23131,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuMO9Z2bOc18soKF3X9jdbnhLrnG3QV6dqRrTKvGltIQIgQjF0VCJJlI3TS3hAz6nGYW723kFvpUAxRdM2avsL4iM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4Nz2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJvQ/9HTv6gYHq7iXdZ+qb5QmokBdS3f3DzfQz1yrAaPut8s30tq6k\r\n9ueoYsdpdo86Ie+lNg8N9CVaXDKHEH1BSjeyS2rttPfyoP+U3uuIhcAR7Xfw\r\nRGv5VcM65uwAs+z/MF89Ks14hrQweTHcdkhJ8MqR1uoJFZOdZOrAQmjw/Dsa\r\n70zhk3OaSPSfUtYVF6e2ShTQc4kVP0twwJpHAbisuHlSuyIE8u8WwAt6SlvI\r\nup+v94kxdar4PxmVoRtSUY4nqlalTp2HglPxkhtAfPeqXfEvBrIdipI8EwLV\r\nTKPm3uhaacZMttPXrDZrIxC2rTITDZgcDRFVRV8T13lE/iUyEiBV5DQTw3c5\r\nkhfVrHTT8+u36ceIZot/9sIJfnDhyTbJKVZEs8cd+OiwOX4hMj5lhsEClSoS\r\nEpyLVbSKiL+8Le/uBgZr7zMQ96NhXuhEdrG/lIn1jpOFpQnOTM6TjRMw2JqV\r\nOoRj09o/Eo7dhDrKE/wZz7xC67uwdEdO717d4SZ2NqTmPiZR/Ps/x6ovTvxg\r\n1Xa8J7pLU1HN5QpoalRu526ZdMqI7k4sdVIOZNFWu3EGGDwiChybWffpd9ah\r\nEoyTx9IJmObz1q4hrc+6yb8JMDiEkg6CPmPU6nmjU9Db6kNprU7Wao3oWD4z\r\nJiI60kWLLSrGwsLJht0juGyQ9ndnHo0hRU0=\r\n=R+F8\r\n-----END PGP SIGNATURE-----\r\n","size":8117,"noattachment":false,"key":"/dom-lite/-/dom-lite-23.2.1.tgz"},"_npmUser":{"name":"lauriro","email":"lauri@rooden.ee"},"directories":{},"maintainers":[{"name":"lauriro","email":"lauri@rooden.ee"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-lite_23.2.1_1675681014470_0.0500816386066798"},"_hasShrinkwrap":false,"deprecated":"Moved to @litejs/dom","readme":"\n[1]: https://badgen.net/coveralls/c/github/litejs/dom-lite\n[2]: https://coveralls.io/r/litejs/dom-lite\n[3]: https://badgen.net/packagephobia/install/dom-lite\n[4]: https://packagephobia.now.sh/result?p=dom-lite\n[5]: https://badgen.net/badge/icon/Buy%20Me%20A%20Tea/orange?icon=kofi&label\n[6]: https://www.buymeacoffee.com/lauriro\n\n\nDOM lite &ndash; [![Coverage][1]][2] [![Size][3]][4] [![Buy Me A Tea][5]][6]\n========\n\nA small DOM implementation\nfor testing, server-side rendering and working with html files.\n\n\nExamples\n--------\n\n```javascript\nconst { document, DOMParser, XMLSerializer } = require(\"dom-lite\");\nconst { XMLHttpRequest } = require(\"dom-lite/xmlhttprequest\");\n\n// Use XMLHttpRequest in server side\nvar xhr = new XMLHttpRequest()\nxhr.open(\"GET\", \"https://litejs.com\")\nxhr.responseType = \"document\"\nxhr.onload = function() {\n\tvar doc = xhr.responseXML\n\t// Work with DOM in familiar way\n\tconsole.log(doc.querySelector(\"title\").textContent)\n}\nxhr.send()\n\n// Build DOM manually\nconst el = document.createElement(\"h1\");\nel.id = 123;\nel.className = \"large\";\n\nconst fragment = document.createDocumentFragment();\nconst text1 = document.createTextNode(\"hello\");\nconst text2 = document.createTextNode(\" world\");\n\nfragment.appendChild(text1);\nfragment.appendChild(text2);\nel.appendChild(fragment);\n\nel.innerHTML;\n// hello world\nel.innerHTML = \"<b>hello world</b>\";\nel.toString();\n// <h1 id=\"123\" class=\"large\"><b>hello world</b></h1>\n\n// minify output\nel.toString(true);\n// <h1 id=123 class=large><b>hello world</b></h1>\n\nel.querySelectorAll(\"b\");\n// [ \"<b>hello world</b>\" ]\n```\n\n## Contributing\n\nFollow [Coding Style Guide](https://github.com/litejs/litejs/wiki/Style-Guide)\n\nRun tests\n\n```\nnpm install\nnpm test\n```\n\n\n## External links\n\n[GitHub repo](https://github.com/litejs/dom-lite) |\n[npm package](https://npmjs.org/package/dom-lite) |\n[DOM spec](https://dom.spec.whatwg.org/) |\n[Selectors Level 3](http://www.w3.org/TR/selectors/) |\n[Coveralls coverage][2]  \n[Buy Me A Tea][6]\n\n\n## Licence\n\nCopyright (c) 2014-2023 Lauri Rooden &lt;lauri@rooden.ee&gt;  \n[The MIT License](http://lauri.rooden.ee/mit-license.txt)\n\n\n","publish_time":1675681014603,"_cnpm_publish_time":1675681014603,"dist-tags":{"latest":"23.2.1"}}