{"_id":"cached-dns","_rev":"3-948bad78b5a7cfdf15e8fc00a62ac45d","name":"cached-dns","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"cached-dns","version":"0.0.1","description":"A library to cache DNS lookups in Node.js","main":"./build/src/index.js","types":"./build/src/index.d.ts","bin":{},"scripts":{"lint":"gts lint","clean":"gts clean","compile":"tsc","fix":"gts fix","prepare":"yarn run compile","pretest":"yarn run compile","posttest":"yarn run lint"},"author":{"name":"James Sigurðarson","email":"jamiees2@gmail.com","url":"http://github.com/jamiees2"},"repository":{"type":"git","url":"https://github.com/jamiees2/cached-dns"},"bugs":{"url":"https://github.com/jamiees2/cached-dns/issues"},"homepage":"https://github.com/jamiees2/cached-dns","engines":{"node":">=12.9.0"},"devDependencies":{"@types/node":"^14.11.2","gts":"^3.1.0","typescript":"^4.0.3"},"license":"MIT","keywords":["dns","cache"],"dependencies":{"ipaddr.js":"^2.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2022 James Sigurdarson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"cached-dns@0.0.1","dist":{"shasum":"2bc0a08baae95068eacb89129870a8089eedbdd8","integrity":"sha512-z9Gb3MU5iv1+z6ISiPABesynRW/SuQ1B8e2LF7ORatxKn9FSLwUhHEGnU10cqfHBa8e2AG9mSHhqxhHl7d6zow==","tarball":"https://registry.npmjs.org/cached-dns/-/cached-dns-0.0.1.tgz","fileCount":11,"unpackedSize":38871,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlPjVdgMxGcwBecHERuAC0Sek998quL1YBhGjykif+WwIhANge3GSYsOeSLoR7/ILee6fJdZoZYCHGFCNcZ5UdMpTP"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3sXBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3Zg//YB+j5IXtpUWlPPTzJYXsR30rCQAJRWFHwQxabWCldRTJcTby\r\nzC3aCMWcUjkDKsXeO/YB7FuvlSqtxAJtNoXDzmV0h85HFGkzvavR1TkAw3PK\r\n45kwt1nZX+pNOXWkU8x7/KTBiEhtMVqv98k94ijEJZX1b2CByGI81wBLnIsJ\r\n+5jOmhxgt2uP1XGPusHzQRWa1KzChbJQUPQSc2xwSZBVkN+c+F8/dVCKihjh\r\nQf+GZT0wJyuuus/Pi2rpY7qXP5D/7PzhkArXRwC1FyA7ShQHDA1OHoF8L/Dy\r\n72ITOTREqe6VECZfcTkVen9w+8QpxThg4Okbz0je3VYJ7YIVJ/drcKb+0FER\r\nnxNa3E0NAs7LN+ZGauRuPUCxGz6obvmbVM6zWtcirnPolUEelz+bqNPnLQ2q\r\n9MzKblsD12hYeQZf0IkS63Wf2TcF6U8mfr1uHQ1TglY/INj59cmxP5+euClo\r\ngFkekpkQGJ86nEKpgVevFUiNEDirkeiW7TKcB0/VcxP+t5X+b3Wee07Jih6x\r\nKxRLguX9JZmqSdsTc5gDN8g6031W41d3u71iY6ogk6wQ0x7oz9vwQQYCnI73\r\nWZ1wERaEEqCj/9wD54wk2NK+SfRWz0O2odTVoCZrFkmE2/oZk+k/zJdM21F7\r\ngkP2AKmttAtwt0tmiHtPZkIYJbSblPMtc7k=\r\n=O2LI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jamiees2","email":"jamiees2@gmail.com"},"directories":{},"maintainers":[{"name":"jamiees2","email":"jamiees2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cached-dns_0.0.1_1658766785173_0.2441453230467734"},"_hasShrinkwrap":false},"0.0.2":{"name":"cached-dns","version":"0.0.2","description":"A library to cache DNS lookups in Node.js","main":"./build/src/index.js","types":"./build/src/index.d.ts","bin":{},"scripts":{"lint":"gts lint","clean":"gts clean","compile":"tsc","fix":"gts fix","prepare":"yarn run compile","pretest":"yarn run compile","posttest":"yarn run lint"},"author":{"name":"James Sigurðarson","email":"jamiees2@gmail.com","url":"http://github.com/jamiees2"},"repository":{"type":"git","url":"https://github.com/jamiees2/cached-dns"},"bugs":{"url":"https://github.com/jamiees2/cached-dns/issues"},"homepage":"https://github.com/jamiees2/cached-dns","engines":{"node":">=12.9.0"},"devDependencies":{"@types/node":"^14.11.2","gts":"^3.1.0","typescript":"^4.0.3"},"license":"MIT","keywords":["dns","cache"],"dependencies":{"ipaddr.js":"^2.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2022 James Sigurdarson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"cached-dns@0.0.2","dist":{"shasum":"73b4d9efc1435ce86d9fcf703ab4c31f62e086d2","integrity":"sha512-ghu2mJL/L9xywZc0kGQvfiZUCl98cbWoQ1qlHtrVeeVNmxwGQ8WiYJOBTtJzgQDmJz7atl/713IOS6hx06Pfhw==","tarball":"https://registry.npmjs.org/cached-dns/-/cached-dns-0.0.2.tgz","fileCount":11,"unpackedSize":38799,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWKA9FSs8XzdYC/PLS+Ksqh+PPYgi2fgUtGYZMH7qMrAiBo3Nk9Fj9pudXh74z0VzZyDpr+AWWDH1XMFyVzNynD9g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3sepACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqgBAAjt+43cZ1m9nG4LhcaaavLA11MgqpfvIIGtgZpZdf24XCdO8y\r\n30/ALL6ueGkpToGi9U3MboFoiyNXzgAQYHjACMyEvDNBZETdW0B+YWFp3TX4\r\n5fbv9DX0vurEoBLUC73ppDgmFEwxGAz2N/XBdAA4oAPs43LJrOzGUhz7rGEF\r\nypQF1QEe//WLsM8rqpzYBfNtbkkY9tN4ywtEF6NHLUAxOjbetHzq8vFnMlJi\r\nS86le3EWNsnCGr9kJl4tBhM9jenwn2A9yKFVFL19jdc6CHWqMDhWHoJ9+BrX\r\ncNSJ9AEZe/CZTbO0Pt+CNebqjmfvhgKOwzu6ClZNaxj21r2rLA1xLjdqHcGT\r\nRm7PShlnq5ou4sHSjBCbSa47r5wkRBcL2xWnZxq5iC3ZO1MvqLxAU4OXXC2Y\r\nfg3QmXNpfJBW9Hl0HsCnZvPoLGN1yyiDwsdYVMBumHB6uxUseIiDOxwLoYC7\r\npRa/xEAvDEzKytNzAIwcrUJ66ssl5Rj1uIlVHKW0xBDUhUCtJFe1hgl51W/7\r\nffJqlQq1ESqFRDwVHMgmqQDkF7FVNPSc2hThyz22zdpivymZnSm8eRiC8Ahn\r\nurgb++KU8CUcOFXVbr+WQ+6SNrsfsf20182nD4XK7O2wLxgerf0hkPxU6aHs\r\nw5G+t3LU6Ydd+ikx/wTx2b4hOHO/vC8kfl4=\r\n=OwI+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jamiees2","email":"jamiees2@gmail.com"},"directories":{},"maintainers":[{"name":"jamiees2","email":"jamiees2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cached-dns_0.0.2_1658767273592_0.6517064694019419"},"_hasShrinkwrap":false},"0.0.3":{"name":"cached-dns","version":"0.0.3","description":"A library to cache DNS lookups in Node.js","main":"./build/src/index.js","types":"./build/src/index.d.ts","bin":{},"scripts":{"lint":"gts lint","clean":"gts clean","compile":"tsc","fix":"gts fix","prepare":"yarn run compile","pretest":"yarn run compile","posttest":"yarn run lint"},"author":{"name":"James Sigurðarson","email":"jamiees2@gmail.com","url":"http://github.com/jamiees2"},"repository":{"type":"git","url":"https://github.com/jamiees2/cached-dns"},"bugs":{"url":"https://github.com/jamiees2/cached-dns/issues"},"homepage":"https://github.com/jamiees2/cached-dns","engines":{"node":">=12.9.0"},"devDependencies":{"@types/node":"^14.11.2","gts":"^3.1.0","typescript":"^4.0.3"},"license":"MIT","keywords":["dns","cache"],"dependencies":{"ipaddr.js":"^2.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2022 James Sigurdarson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"cached-dns@0.0.3","dist":{"shasum":"e47bef8926cf45d79c93958af26ea781fc73b694","integrity":"sha512-hEbs8ZQKGAjAw4CUaRMxcMk3fhgYI/tTBtHVg4MEdkULeC9+G61XZQbZ+5fZ7OjSKzu6TkXh4TggNXv/RIyeaw==","tarball":"https://registry.npmjs.org/cached-dns/-/cached-dns-0.0.3.tgz","fileCount":11,"unpackedSize":40208,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCafbv0Fs/8x0c5boIlztZqkjxEN3DsH/CyR5Inpw2ReAIhAPCGfm9UtAKDrs7fduczrGv4Rw2uSgazx/2HxNY/lo6l"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi37SSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrA0RAAo/vP7zeEgUcoUvwC7wREHmkBv/jQ4ed2KpkvxX5i338MEZwK\r\nlR+P4PA/ckeDoYGHH1n4PlMVJLUczi1AUL3DboKailKOxdlXD1v57fkqZy/B\r\nEmM2QDKH+uGt0uyWYyrux5t1QugTbunLqQXYuU1PIvvKc/V6nU4CPk/omgkz\r\nyml3VHc9ZrcyGD8ZJCM/mMpJeOvzRQZM0LB7NNBIwLitM5l+GcFcI3I4Jrmx\r\nudOSsChnfLLk2PsHMokWXBmC8QiFoA2dfSy2CCSS0L6E9zxotlpAj0HHUQZX\r\nHYnbA2d5srgWlYTT+vm3Hr4v6lBreC22bESSWzxu2S8Ny+BcEf7fciDr+58g\r\noF+cWGE8yxv8fRFUiyQxA4s4nAKsCFmk08spVn73GOJQGioW3sX4qltAGCxW\r\noz24kg75bNQvdIyJf00TCjKLGqLliWl3s7FQNHQRvOjlE26wdqNVX3R6BIlF\r\nRaRduRrKQ7I5A8xq9z6tH4REaIWWRnMXT5qXHspCPsvC6nyPKzngm8IEfpvN\r\nWzJkiDHsHfgOc/7pxf5Ekts66U4XkGqDo32QHmOvP02c010z4t2TKmyOzTfc\r\nyAoU5nc4k9gyzYPGXMLLJhJGekIyTwn8GghX9oH+SbaqObfU+6n5SATqW8uF\r\n8t+I1pfRHbR2MyQ6TMV0vDESWPl2gH5KJZg=\r\n=+0Xb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jamiees2","email":"jamiees2@gmail.com"},"directories":{},"maintainers":[{"name":"jamiees2","email":"jamiees2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cached-dns_0.0.3_1658827921841_0.22525299005783528"},"_hasShrinkwrap":false},"0.0.4":{"name":"cached-dns","version":"0.0.4","description":"A library to cache DNS lookups in Node.js","main":"./build/src/index.js","types":"./build/src/index.d.ts","bin":{},"scripts":{"lint":"gts lint","clean":"gts clean","compile":"tsc","fix":"gts fix","prepare":"yarn run compile","pretest":"yarn run compile","posttest":"yarn run lint"},"author":{"name":"James Sigurðarson","email":"jamiees2@gmail.com","url":"http://github.com/jamiees2"},"repository":{"type":"git","url":"https://github.com/jamiees2/cached-dns"},"bugs":{"url":"https://github.com/jamiees2/cached-dns/issues"},"homepage":"https://github.com/jamiees2/cached-dns","engines":{"node":">=12.9.0"},"devDependencies":{"@types/node":"^14.11.2","gts":"^3.1.0","typescript":"^4.0.3"},"license":"MIT","keywords":["dns","cache"],"dependencies":{"ipaddr.js":"^2.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2022 James Sigurdarson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"cached-dns@0.0.4","dist":{"shasum":"56f60dde80969f3e1096484dcf34d53c9cc56283","integrity":"sha512-4P9r5QvUmlCX3LVpBL3Zv00DXSbk1b4hYHL8u9fctlcXdeXqSVSMlSMSMeRCR64nxSmNqPioHgiLQHjF84d1zA==","tarball":"https://registry.npmjs.org/cached-dns/-/cached-dns-0.0.4.tgz","fileCount":11,"unpackedSize":40206,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZZPMqSBUy6cXG1gP3ZfWK9mSuN8RzXEd1PcCExemCGgIhANecCOVI4e6fcIaLASwYN/KMOU+ZVyG5chs82lFftyFk"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi381EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmNg//fL86gLfPZhHDT7672/kKM/kNyXvpFzx0IBI4GE4Z58pftOUa\r\nTtznY0AS0ONnsowHjN6uXm4Kb1rSLtRsbQKtbrsOsqAB7Wjx2xuCrE7Obq7u\r\nX8nHGOczdUeBnNiJ/Wou1f3fwjx6/KLBCLyCUapseZjJE4nPhKys4EybStqb\r\nHGrqaRXF+R4ptoIh1DfvM9qitTvN+6kTbbdH+BAvst+jVPd08cVr7WthEFvn\r\nK1dTdDvPBe4dM9vVRLAG6vHhiNSZ+mtx5vQp8npQmbZ2w4SKzbiQZP0+m64y\r\n+zV7bWYLhbVDLmeZH/JKi33Pf757xC++yqjtoRRE2vkVBZnK7Oathjpju1zN\r\nkhDXwBDzCGpOg6+R0Q8jaJr2a+BrJaazVrbofHlPWmdlKyyJ1c0z7hSRCR2d\r\nqNYQ1+m2sX6EVsDYwBUwwA1k3KUeTlKfXH8SlbpgENdfuvvm5ze7HuSoF8C3\r\ny0Jkj8ECp8Q8km/ngsE2aeRjTbp7BlxD/gaDisbduaoldLMQ3a+EObNCvJ1G\r\np25q7MJOISDAx9aUWM1czvIKXHv9Wh4CYy+r+dW6FytiQUnOKRofNBB46ivv\r\nkOICVYqtmpQq3moMaM2r8I53YzmjBD/XayXWTSFNOkyQt8CoUBe8RVDZOOzi\r\n9jLd5ePxeLLKMoo89iHkThM8z/Kqk6W0tMw=\r\n=Zhwn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jamiees2","email":"jamiees2@gmail.com"},"directories":{},"maintainers":[{"name":"jamiees2","email":"jamiees2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cached-dns_0.0.4_1658834244393_0.7122643340281454"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-25T16:33:05.034Z","0.0.1":"2022-07-25T16:33:05.349Z","modified":"2022-07-26T11:17:24.707Z","0.0.2":"2022-07-25T16:41:13.797Z","0.0.3":"2022-07-26T09:32:02.048Z","0.0.4":"2022-07-26T11:17:24.634Z"},"maintainers":[{"name":"jamiees2","email":"jamiees2@gmail.com"}],"description":"A library to cache DNS lookups in Node.js","homepage":"https://github.com/jamiees2/cached-dns","keywords":["dns","cache"],"repository":{"type":"git","url":"https://github.com/jamiees2/cached-dns"},"author":{"name":"James Sigurðarson","email":"jamiees2@gmail.com","url":"http://github.com/jamiees2"},"bugs":{"url":"https://github.com/jamiees2/cached-dns/issues"},"license":"MIT","readme":"# cached-dns \n[![Build Status](https://github.com/jamiees2/cached-dns/actions/workflows/main.yml/badge.svg)](https://github.com/jamiees2/cached-dns/actions)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Docs](https://img.shields.io/badge/Docs-latest-informational)](https://github.com/jamiees2/cached-dns/)\n\nDNS caching implementation for Node.js. Provides same API as [`dns.lookup`](https://nodejs.org/api/dns.html#dnslookuphostname-options-callback)\n\n[![NPM](https://nodeico.herokuapp.com/cached-dns.svg)](https://npmjs.com/package/cached-dns)\n\n## Install\n    $ npm install cached-dns \n\n## Usage\n\nThe `lookup` function provided by this library has the same API signature as [`dns.lookup`](https://nodejs.org/api/dns.html#dnslookuphostname-options-callback). \nIt supports all options, although `options.verbatim` is redundant, since the resolver will resolve ipv4 and ipv6 addresses separately, and join them together inside Node.js.\n\nAdditionally, the library exposes a `lookupPromise` function, which has the same API signature as [`dns.promises.lookup`](https://nodejs.org/api/dns.html#dnspromiseslookuphostname-options).\n\nYou can either use this manually, by passing the lookup function to functions that support it.\n\n```js\nconst lookup = require(\"cached-dns\").lookup\nhttp.get({\n    hostname: 'google.com', \n    path: '/',\n    lookup: lookup\n}, (res) => {\n    console.log('RESPONSE', res.statusCode)\n}).on('error', (err) => {\n    console.error('ERROR', err)\n})\n```\n\nAlternatively, you can tell the library to overwrite the `dns` module's `lookup` function, with this implementation. This makes it easier to patch existing code, but is dangerous.\n\n```js\nconst cachedDNS = require(\"cached-dns\")\ncachedDNS.patchGlobal()\n\n// this will now get cached by default\nhttp.get({\n    hostname: 'google.com', \n    path: '/',\n}, (res) => {\n    console.log('RESPONSE', res.statusCode)\n}).on('error', (err) => {\n    console.error('ERROR', err)\n})\n```","readmeFilename":"README.md"}