{"_id":"get-dom-document","_rev":"3-648f220aee9c42693e31710cd129b281","name":"get-dom-document","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"get-dom-document","version":"0.1.0","type":"commonjs","main":"./lib/get-dom-document.node.js","module":"./lib/get-dom-document.node.mjs","browser":"./lib/get-dom-document.browser.js","types":"./lib/get-dom-document.d.ts","exports":{"types":"./lib/get-dom-document.d.ts","node":{"import":"./lib/get-dom-document.node.mjs","require":"./lib/get-dom-document.node.js"},"browser":{"import":"./lib/get-dom-document.browser.mjs","require":"./lib/get-dom-document.browser.js"},"default":"./lib/get-dom-document.node.js"},"description":"Get a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.","author":{"name":"ocavue","email":"ocavue@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/ocavue","homepage":"https://github.com/ocavue/get-dom-document","repository":{"type":"git","url":"git+https://github.com/ocavue/get-dom-document.git"},"keywords":[],"sideEffects":false,"scripts":{"release":"bumpp && npm publish"},"peerDependencies":{"jsdom":"*"},"peerDependenciesMeta":{"jsdom":{"optional":true}},"devDependencies":{"bumpp":"^8.2.1"},"gitHead":"216a8d78220714ec1e3d728f1fec34758f8002ce","bugs":{"url":"https://github.com/ocavue/get-dom-document/issues"},"_id":"get-dom-document@0.1.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-QaZVTlEk9mlEmg9GYxM4P2q/Df8OFYcQl2w7rHgvt2PaDoJYeQPYnA2c7TaIq7APJBukCba3By5NjeY3drTijQ==","shasum":"cd4aecc6f858240495545da951088f32f3060070","tarball":"https://registry.npmjs.org/get-dom-document/-/get-dom-document-0.1.0.tgz","fileCount":8,"unpackedSize":4509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyV6yxMXU+PxADwY4nLtCKoZoSUAMva122Nabi/kmUIAIgYbIrR7agF5G3P00Xsy1p1SW0wz7ULC5ro9P5WJfZafU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLDunACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpzLw//VUCTiBRXfJo/yV4i53X9l7qoz+KdZ3QmzgYS7C0+qnVJ2Wxj\r\nUC5oSRc7w0u7wwdIf8zGRnygY97OAAfN1inDtlem7BQuXtefMVdT5P66010z\r\n9AYtWdVeAMgmgih6cXT0mMh0pWgCH+DRY4DH+8hHPr14e0jnoffnuGIM6XiR\r\nJYdJUfokQFhwwlmudKNoAMxWpF37gE1EpKLAztWYuOMm9DHuClTfG5mEV6UW\r\nUCM1XKkqJrRZRP2Qul7t7CLmN0WoJbiuAdFeRnY3EsNIVAs/NaSKVfgwsTXM\r\n2Ul/+5H0TOZoo2xXPipAWP3hpJK+s3UEhZNn+lv7dqWPUjxy/enbXsRkJcFM\r\n1x5SK4wtuwON7X7MFO/K30ls2YwCdUgN928dhBrUkEdLkiUf2+Jv+JTYGksS\r\nlz6bagKfJNxtt0oBLHLl+pkG/3pA9wVwEQKGj+6pSDMarJzwy3sA02LhWziu\r\n1SXqszVcF5E4m7t/UEGYHNzTPqYnwXojbvllVq0PanHyH2skGDH3ACGiLEFq\r\nIGHbvHMQJ6+92zMv3JrFc0sQrdD/BY8x4jtsB49OTpxa1Bq48FudbX9Ldum9\r\nRu5o7r4Jp+rpgYwU71qd/ctSDwHsiw25rqXMeBHxx2PGB5ShvrzJWlw/oDeo\r\nVZYHbYuiTBKD5kKJMTdCuCEs/lm4cOa5nlQ=\r\n=4GMe\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ocavue","email":"ocavue@gmail.com"},"directories":{},"maintainers":[{"name":"ocavue","email":"ocavue@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-dom-document_0.1.0_1663843238944_0.5510424823355724"},"_hasShrinkwrap":false},"0.1.1":{"name":"get-dom-document","version":"0.1.1","type":"commonjs","main":"./lib/get-dom-document.node.js","module":"./lib/get-dom-document.node.mjs","browser":"./lib/get-dom-document.browser.js","types":"./lib/get-dom-document.d.ts","exports":{"types":"./lib/get-dom-document.d.ts","node":{"import":"./lib/get-dom-document.node.mjs","require":"./lib/get-dom-document.node.js"},"browser":{"import":"./lib/get-dom-document.browser.mjs","require":"./lib/get-dom-document.browser.js"},"default":"./lib/get-dom-document.node.js"},"description":"Get a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.","author":{"name":"ocavue","email":"ocavue@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/ocavue","homepage":"https://github.com/ocavue/get-dom-document","repository":{"type":"git","url":"git+https://github.com/ocavue/get-dom-document.git"},"keywords":[],"sideEffects":false,"scripts":{"release":"bumpp && npm publish"},"peerDependencies":{"jsdom":"*"},"peerDependenciesMeta":{"jsdom":{"optional":true}},"devDependencies":{"bumpp":"^8.2.1"},"gitHead":"121679c6ffea0a76adcf575f52b8ec6d042c1dab","bugs":{"url":"https://github.com/ocavue/get-dom-document/issues"},"_id":"get-dom-document@0.1.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-UW/5ylJ7Tmr+26aYKAkftK4G0wbtY/YyOjrKPzWDkLifVS/Kpsgkmxzf2yRfJDMyUofEmccU8CxmSCsV3AKT4A==","shasum":"a50975471c93a897295276299af0a9bba8542496","tarball":"https://registry.npmjs.org/get-dom-document/-/get-dom-document-0.1.1.tgz","fileCount":8,"unpackedSize":4517,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmoPt7H9Oy/O4a9cn8KhxpVnCKBR0x+yLpuOymp1jw6QIhAKuts+ySzE5EZckrRyEWJ84hqPjgJoIwYiU6ZQeqVJGD"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLUgPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoafA//Wz540J926SgPQpOuXtaJjehEtSKYVxRzl/MFnw77vtX2aNbc\r\n4FgM5tJxTMb6YSZaRSo4+QqgRl7sjtiVgUSu/U3rWCgENTMxF2zcZKc//8Kq\r\nqPKxszwAormmutTJWnpgnbmQFhZv2bB31R2No3sh4ZQYArR6BJvZyU+2tZsi\r\n8czPcrlVWIpclRe7HSOgQeS2BcHudLMY0fDxTbe5hPSthQ95f7UTIkcVomsL\r\ny93Fh53cxVaoFNXsp7GloXGxU0bFzMIO8pwKinAr43TkDbbe2+0JdylyKKb2\r\nO9RjMjYq3LOI8fvVYNvrpcdVOV1GHRH9aLZqO5yZKvCubWZhSeAz51ffOsIn\r\nTKYTZbliAmW6vfdN9CPBltJwk+5vtRbKwu4dWUG7uB2vNvODlbRoektWJ7pW\r\nOvsUy9aeRbW0G587sCIneKhefVYcUHxoMF7BWjm9kSDe2cUtKC52ivKbUiwn\r\nwB4QVH+WLrSloL1ehMYNQEAKcmDDKLhz8+HdLlO/jOC1SiqU6dVLSnVCmMoa\r\nE9wZ0qKaivW5VfHhOsLHTl6bSfEtE6jBU/VIlg72J2Hz2HamP/1iPGmb5GqI\r\n7XmxhlrDfVjiJAozhnmyBwqJivu8asDhFCeUk3ehSxev9MWRdRClFRH6ZgaJ\r\nIeLiO9Knw7uuBOs100HgNlwjBjdN1/ZwPtU=\r\n=hyt/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ocavue","email":"ocavue@gmail.com"},"directories":{},"maintainers":[{"name":"ocavue","email":"ocavue@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-dom-document_0.1.1_1663911950962_0.6134509934082888"},"_hasShrinkwrap":false},"0.1.2":{"name":"get-dom-document","version":"0.1.2","type":"commonjs","main":"./lib/get-dom-document.node.js","module":"./lib/get-dom-document.node.mjs","browser":"./lib/get-dom-document.browser.js","types":"./lib/get-dom-document.d.ts","exports":{"types":"./lib/get-dom-document.d.ts","node":{"import":"./lib/get-dom-document.node.mjs","require":"./lib/get-dom-document.node.js"},"browser":{"import":"./lib/get-dom-document.browser.mjs","require":"./lib/get-dom-document.browser.js"},"default":"./lib/get-dom-document.node.js"},"description":"Get a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.","author":{"name":"ocavue","email":"ocavue@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/ocavue","homepage":"https://github.com/ocavue/get-dom-document","repository":{"type":"git","url":"git+https://github.com/ocavue/get-dom-document.git"},"keywords":[],"sideEffects":false,"peerDependencies":{"jsdom":"*"},"peerDependenciesMeta":{"jsdom":{"optional":true}},"devDependencies":{"bumpp":"^8.2.1"},"scripts":{"release":"bumpp && npm publish"},"bugs":{"url":"https://github.com/ocavue/get-dom-document/issues"},"_id":"get-dom-document@0.1.2","_integrity":"sha512-vh+334mlpztbnwcmBkuUgszzurptR7z3ZquoW2Xq1hapGDyfzXWktPksyFQocjSN+NyFx9g1M8NaB8ncdBgATg==","_resolved":"/private/var/folders/00/y54gq_b567l2cd0qtqqqlysm0000gn/T/2906313ba707971d6e6c0ecd3896551b/get-dom-document-0.1.2.tgz","_from":"file:get-dom-document-0.1.2.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-vh+334mlpztbnwcmBkuUgszzurptR7z3ZquoW2Xq1hapGDyfzXWktPksyFQocjSN+NyFx9g1M8NaB8ncdBgATg==","shasum":"1e6f3e2a7fe26d8655ba97cc5b06a8e1297336e4","tarball":"https://registry.npmjs.org/get-dom-document/-/get-dom-document-0.1.2.tgz","fileCount":8,"unpackedSize":4813,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmQ2wgDtoVD7q8MrTeGaAJTtTQrngrPChr16E9HDSAfgIgTCaippdwTZle2YH+9JHmWZOnHAv+iBZBSN4gViLxsb4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSTfxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjVBAAg3LwjCUYrdR+qXPSlb1LG3iOKwEFEcjt5OaosyOIHQzbaJqa\r\nV9ElbP41FWUCUSgIhSnL9XjBeCY46wQIcGVllDtFkVGeT0ynRYstfgLHJjfn\r\n7L8ruoEvuKprRsn4je4dKDNp+kXBWCIW5DUSrhDLm57P2lbwOtBEU4+INLho\r\nwAzwby7O5xVnDBt1lSy8o85Bou2lGs6+GGaADMEixTthVMPGdOoKj+e50Nsg\r\n8/Bfee8k8qaKKnW3yS8sYjjviTDJhl8TLjrhwoM/N+GiykNUACvGwGP0vgX9\r\nYjylJqI/DczbH0UTl9+nref8W8FGdfs2t6g1CJu5EsK2cblZwOswNgmGwGtB\r\nIqzybhWD/Z3mTNUCigiqiT6bv7nx8qiDYavGcoAyLk/0EiFfAI01b3MeAMsR\r\nJ7NWAuhET+YRC6umxNXJlgPjRLmjNuIt7nNKQDw/G2KFtdYIK8oX61oXK9Pq\r\nxQg8DGMdioQupP05Z6oJBPvHPUIk9j4TprbZIatThydZm2XV8jJFdruiymOQ\r\nvAyhqoubsnWOMjK6PhEDTAvB/AO6Z0+sCLWRPH9iyOdGbhuVgmg4Hg4VVQqx\r\n4U0+nTsRcd6RIESeVRuSGgyblXxQ+PDf68FXIEj2GI/+uXaDb/idfd9asWvo\r\nd8TkzrY12L02MK8am7l5G08fCjyn/EGZ32o=\r\n=N5Gt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ocavue","email":"ocavue@gmail.com"},"directories":{},"maintainers":[{"name":"ocavue","email":"ocavue@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-dom-document_0.1.2_1665742833417_0.8850973872059125"},"_hasShrinkwrap":false},"0.1.3":{"name":"get-dom-document","version":"0.1.3","type":"commonjs","main":"./lib/get-dom-document.node.js","browser":"./lib/get-dom-document.browser.js","types":"./lib/get-dom-document.d.ts","exports":{"types":"./lib/get-dom-document.d.ts","node":{"import":"./lib/get-dom-document.node.mjs","require":"./lib/get-dom-document.node.js"},"browser":{"import":"./lib/get-dom-document.browser.mjs","require":"./lib/get-dom-document.browser.js"},"default":"./lib/get-dom-document.node.js"},"description":"Get a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.","author":{"name":"ocavue","email":"ocavue@gmail.com"},"license":"MIT","funding":"https://github.com/sponsors/ocavue","homepage":"https://github.com/ocavue/get-dom-document","repository":{"type":"git","url":"git+https://github.com/ocavue/get-dom-document.git"},"keywords":[],"sideEffects":false,"scripts":{"release":"bumpp && npm publish"},"peerDependencies":{"jsdom":"*"},"peerDependenciesMeta":{"jsdom":{"optional":true}},"devDependencies":{"bumpp":"^8.2.1"},"gitHead":"e3f6613b5f1899e6edd4ec577233eb1f3c36bc51","bugs":{"url":"https://github.com/ocavue/get-dom-document/issues"},"_id":"get-dom-document@0.1.3","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-bZ0O00gSQgMo+wz7gU6kbbWCPh4dfDsL9ZOmVhA8TOXszl5GV56TpTuW1/Qq/QctgpjK56yyvB1vBO+wzz8Szw==","shasum":"d0188090e43d38dd146c467ac6e3e1f2ace7af52","tarball":"https://registry.npmjs.org/get-dom-document/-/get-dom-document-0.1.3.tgz","fileCount":8,"unpackedSize":4767,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4urxx08yUKGSXRCdf2Ce09Er4WDANoTQgtlRkTjT2hAIgIstcAwZeXFxOfTWMEhvnRhlMOHZthovoN8SMSwyoB3U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTRmeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmotZA/8DyEJWNFG5R4vBEidbw9ZcYGoDLPO26Na1h7PTQnU09o9U41p\r\nF/1XTMUlwcJBpcBLaFRsK5ZTZtp/XjTNbDKi49BQQtFKx3yfrCyHPrj4BGQ2\r\nd+hNtkkpu0nAgG3I0S2HHGXiXZWOwHme+NGslCjqheYK+wF/dcTu7RGO7f4W\r\n2nnTbr79Zj1jvkOLGm9msIsfMawH3ouFTJya1c0HEk8KqdkaMElcz+QnBqNG\r\ntukMiAYaqNZ3c7XX7fAx2aj2m732pDyyOlG7NRi6olLs9rmHxXK1MPdlYHEW\r\nLtgEIbmD75vBGr3qUQTtfiXhMTxn7K441xwVdXnh7uF4Hub7YWTATpcVpGLv\r\n/26sz+/VSfA/+jce/BblHKexC+BcKkiRruAQE4C2vBwrCAoswyUIKHyGPV5g\r\nBZ7IEgM+7ZZY9hWhGgTdTdv2w2ZQUeT26SkbcJKZ2V8XNaBwpijKA2S3m9Sb\r\nlWov/bRokQV8LLLK0GHi+zdaR8k3EIbqbzWSuxwAsmnaa6CgAO7JAW60Bbz/\r\nAN1G0eQ5ZU5Hd+mRfZ9NkpA7SevpXnfGUg1epXegiAwsfeqIgIeGK70bwWq/\r\naJ5IcaOYvzVTPKqpm6VvTdm5wRwwNHMvXbd5mI5Mivrrnc/MHmv5oFql/Bo7\r\n5gaERCOjLcyGiGy8Bgehnb/MjFgIP2rUVxY=\r\n=OE+0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ocavue","email":"ocavue@gmail.com"},"directories":{},"maintainers":[{"name":"ocavue","email":"ocavue@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-dom-document_0.1.3_1665997213866_0.4144683622807055"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-22T10:40:38.944Z","0.1.0":"2022-09-22T10:40:39.135Z","modified":"2022-10-17T09:00:14.122Z","0.1.1":"2022-09-23T05:45:51.149Z","0.1.2":"2022-10-14T10:20:33.551Z","0.1.3":"2022-10-17T09:00:14.023Z"},"maintainers":[{"name":"ocavue","email":"ocavue@gmail.com"}],"description":"Get a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.","homepage":"https://github.com/ocavue/get-dom-document","keywords":[],"repository":{"type":"git","url":"git+https://github.com/ocavue/get-dom-document.git"},"author":{"name":"ocavue","email":"ocavue@gmail.com"},"bugs":{"url":"https://github.com/ocavue/get-dom-document/issues"},"license":"MIT","readme":"# get-dom-document\n\nGet a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.\n\n`getDomDocument` will firstly try to get the DOM document from the global `document` object. If it is not available, it will try to create a new DOM document using [`jsdom`](https://github.com/jsdom/jsdom) in Node.js environment. If `jsdom` is not available or it's not running in Node.js environment, it will return `null`.\n\nThis package use the `browser` field in `package.json` and [conditional exports](https://nodejs.org/docs/latest-v16.x/api/packages.html#conditional-exports) to provide different implementations for Node.js and the browser environment.\n\n## Install\n\n```\nnpm install get-dom-document\n```\n\n## Usage\n\nCommonJS:\n\n```js\nconst { getDomDocument } = require(\"get-dom-document\");\n\nconst document = getDomDocument();\n```\n\nES module:\n\n```js\nimport { getDomDocument } from \"get-dom-document\";\n\nconst document = getDomDocument();\n```\n","readmeFilename":"README.md"}