{"name":"dom-lite","version":"23.2.0","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":"22.12.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":"b81905105db4769fea60f623c0af4d823218ce04","homepage":"https://github.com/litejs/dom-lite#readme","_id":"dom-lite@23.2.0","_nodeVersion":"19.5.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-c1Pnu+JQF++Z1JUa9DKZcQrzVo/LQb4jfFl5wYE4B3LXcy/313mUOCweVUOPRsqnqc9UJG3rffPI9SpFsZ3Yuw==","shasum":"7550e2f01486b5f47b6ca623f26ed46b0956f2bb","tarball":"http://registry-npm.ywwl.com/dom-lite/download/dom-lite-23.2.0.tgz","fileCount":6,"unpackedSize":22768,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbKdqXUv6yeOy7OYoYiOy/88GwxcKs3tY/kdxKUcRvLAIgFdRJsNBhoCPNoZwZ/JZ6CjTIRPnVehiT0Tg60bcUGjg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2uKNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6fRAAhxOzPOt/3pnliP49lFt7KbvUnRmTXiCHWXnm67MlaeYHe4LH\r\nT/o3Y0d6I3LMBQvTWelxCN6CvqQ3FEcE3Bd2f28UF98/OSrsKnDQaxqeDhqU\r\nzYByzgClrj0oNyAkA51Ro3lQb0kFo6IK1RAQpufyuaK9ClHmexx7JBswb7Xv\r\n4QLp40Kw/Qlcc17lamp++8VYu6rw8vCVkc3pcAwaw5H2Q+FqmnJtPrLyDJbS\r\n7ceVCVHqvToaDEC5lj0GVIpaTNTrdBsG1GO1xGwyqtRM8w+PSMjAW0J34Hr8\r\n4Gs9D0k2p0ptStvw4jMqtalgzLN0WiL53F1fJe52hJjPsxiIgSdwOXP0kSCF\r\nGa2zPVWrsocU+zy63Y/mipvTmCp4kAhSCiyplfZ2/XdObCyv9iOnPoNUEnnr\r\nNQkq45rKbnCDXRiDzwRKrrt5sCWbY3id0Qd+0jRpJjEzla0sKKJ9CkafRIon\r\ncGDRXpa/hWPi9s/oueAYnaNX9ZURv4oE7IYLl2ccjOWijYjVOVdSXaGVPp+H\r\nPyqX4xaTHg6DoMrKTFMQRXYnemM2/ragKIYBJE+5plyq4tjfgq3xNeZ2Xy/f\r\nHJmtpVJ0/uHIneDRZW4mQP61lWzH1Vzvm897LT87IsrOs5pVrOeti/eMUvyB\r\nZVrFo+bcvWHi5PfqS/c4AJNoWdrUCC7xjDA=\r\n=qqz1\r\n-----END PGP SIGNATURE-----\r\n","size":7951,"noattachment":false,"key":"/dom-lite/-/dom-lite-23.2.0.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.0_1675289229070_0.6309233670940408"},"_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":1675289229235,"_cnpm_publish_time":1675289229235,"dist-tags":{"latest":"23.2.1"}}