{"name":"dom-lite","version":"22.10.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"],"main":"index.js","scripts":{"test":"c8 -r lcov -r text-summary --check-coverage --100 lj test --brief test/index.js"},"repository":{"type":"git","url":"git+https://github.com/litejs/dom-lite.git"},"bugs":{"url":"https://github.com/litejs/dom-lite/issues"},"dependencies":{"selector-lite":"22.10.1"},"devDependencies":{"@litejs/cli":"22.8.0","c8":"7.12.0"},"litejs":{"build":"lj build --readme index.js","lint":"jshint *.js"},"jshintConfig":{"asi":true,"laxcomma":true,"maxdepth":6,"quotmark":"double"},"gitHead":"ffa1bd90c2eb15c519f0706585e4ca8387f0bd4a","homepage":"https://github.com/litejs/dom-lite#readme","_id":"dom-lite@22.10.0","_nodeVersion":"19.0.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-NYKpzA3wjsoLDKo/2YpHFzDohgkEwDZwxk9cMBwA+eR+6jqgDrVbdP6/be5UChBiKJGXWEJD+/6IZlVkFr22Hw==","shasum":"1b275155ad24c83f435108aea30f3c0e1d54696a","tarball":"http://registry-npm.ywwl.com/dom-lite/download/dom-lite-22.10.0.tgz","fileCount":3,"unpackedSize":14243,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH5VT0R2EbQxchlnCHFeHnrmjgvC+3uU3/enaHi3D1rUAiEA435smTUVBral8jfE+IsisW3MnjFRsAsX1ClALwy7brs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWpxBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXuQ/7BY+KO3tWghJJ6qifAmPRCeWlWP+b2Kq1j9Yp4KemuIvVHN01\r\n9xOHwQNwmYGVSomI54iaceNzky2JAZ6G83PvDC7E/eZu0HTaLihWLcoqPAp0\r\nLoKxbN2cLVXBwOO9AWNgd6VjUBIHLEbsVHlmw++Wz8seacX3AnQ/shmOR1ca\r\nkwd1ywrQ4Fai3FtJqJ7ujOAA5yt0EKSPFOQ8EezDEOyX4Fi3MHhitBH+UnY6\r\nImrk+Lvt3gAF6DxowTvuncmNbD/YoygaElg9wRYLvsthgvcez4hY1syLEBtv\r\n5/04R2qYvAQXu+hMp0JMFakrhNrHrBUARIhv5yDkEXumSBR5fdY5hB1TvT+O\r\nrpTWEJNWQ3nsbmtfLdRG+bMyeMg0OFT2QR3pe7JwQull7IBLxz9k0/z0PCJa\r\nU0tFW7t3JVe2h2RRM5/lV/5VKTsLy1P+DU3lbGuGPCPwtanYT1LFOYlV3d73\r\nGuZjsME2gkDgECibuiHAC7nLXC8Sq5T4zpjt9WA9IWW6DLexbxtMpVZ84SO5\r\n5C+C3Z11FQkluyiMelXewc9eHNTQ6M8nrclT3BUb+ENYEWl1WIaJKT4vppYF\r\nvygiFAhhFm15zGBg5AXNH4E7vP8qLij/0w4rDl3KKZ+z3ebvrolmhCxF3Y8S\r\nydH3JcYrrdGH5p7pEaPAdnwb+ZnKK1Z5Quc=\r\n=38ih\r\n-----END PGP SIGNATURE-----\r\n","size":4859,"noattachment":false,"key":"/dom-lite/-/dom-lite-22.10.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_22.10.0_1666882625152_0.1566685886649153"},"_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":1666882625413,"_cnpm_publish_time":1666882625413,"dist-tags":{"latest":"23.2.1"}}