{"name":"dom-lite","version":"23.1.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":"80b31edf81edf2563c191298fc71b6874cfc102b","homepage":"https://github.com/litejs/dom-lite#readme","_id":"dom-lite@23.1.0","_nodeVersion":"19.3.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-XD0QKe7NNHiBaoouU925d0PVudQeuQNq98P6HaPk/W/boYxqd+bgC2n/yzTZOp/kIdGqdAPn1zi2lvUsdsPpPA==","shasum":"71176b9cab53997287c878ff9be3237875000039","tarball":"http://registry-npm.ywwl.com/dom-lite/download/dom-lite-23.1.0.tgz","fileCount":6,"unpackedSize":22400,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpt3UBzxDMrpcbN583Y837GSNEJpqofoy/kPnmse83UAiAgIpDWoF8GK9/fLcf4BM4tUobhzQkZ3yxzQWHC6w3H0g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzTdGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoH/A/+P3Zfhd6J+NHct6n+cwBZfbgF36XvoflE9sBzYWTfMxjzY3z+\r\neTNtal5aVHskSUrdL7c5ad1/JbBtYYmn5nY1KfyHCB2lCdzElrAGB7DOA3Vz\r\nzWxSGooiGnFBA34Wm6GGb0QVLVfxBmsm1VpiQWTgqgOr4VD8Be6E3N/kiL9j\r\nfguEG5t9eSX6gLdNHXpRJ6g3/R0+cvXiLJybgmgx4PoofnvhwvL2TrRFzCG5\r\nb/yjxFLGYeEnNuc2UMta10M/fjPv2sPb9WZBTw2Btpu4Rtm6ttNtKSBcwuSo\r\n8/7FNPTc1XbrTkKCGxikesRLm6J9ZRcvj1F2IP5arDh715aLiViPbcCUItWM\r\nMz3J21DgUpens6LrK+LEGTdynxJBwxufYebrimcPufCJuJhbU01p3MZPAeQk\r\ngI4HJKAfQxMhwkX3TIxB/Y15AwFsuG9yYhE0RPhptDIItJp0IEiZMHs2Y3VX\r\nZUTrlTrBCI5nVXkIp1AxYW60jTdgFTJzVycBexePgzeu5tT3IMwXUDYpCNZq\r\n5oSf4rDCcgVYCKoB8tPaL2Jg23Wfu9eTPUnlTtLMYt/LDx32rzquH8SWqovv\r\ndyxrC0RVXdRz7VUSvvRaIHDfTZvi202RXZcGp21/H2YKyL5fIs/XZM4t/QDS\r\nIc3p32HmGr876644q5hcZRwTVh7a/1j3BK8=\r\n=QMrN\r\n-----END PGP SIGNATURE-----\r\n","size":7827,"noattachment":false,"key":"/dom-lite/-/dom-lite-23.1.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.1.0_1674393414567_0.023409272387726165"},"_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":1674393414732,"_cnpm_publish_time":1674393414732,"dist-tags":{"latest":"23.2.1"}}