Socket
Socket
Sign inDemoInstall

cacheable-lookup

Package Overview
Dependencies
0
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.2 to 6.0.3

2

package.json
{
"name": "cacheable-lookup",
"version": "6.0.2",
"version": "6.0.3",
"description": "A cacheable dns.lookup(…) that respects TTL",

@@ -5,0 +5,0 @@ "engines": {

@@ -283,16 +283,23 @@ 'use strict';

async _lookup(hostname) {
const [A, AAAA] = await Promise.all([
// Passing {all: true} doesn't return all IPv4 and IPv6 entries.
// See https://github.com/szmarczak/cacheable-lookup/issues/42
ignoreNoResultErrors(this._dnsLookup(hostname, all4)),
ignoreNoResultErrors(this._dnsLookup(hostname, all6))
]);
try {
const [A, AAAA] = await Promise.all([
// Passing {all: true} doesn't return all IPv4 and IPv6 entries.
// See https://github.com/szmarczak/cacheable-lookup/issues/42
ignoreNoResultErrors(this._dnsLookup(hostname, all4)),
ignoreNoResultErrors(this._dnsLookup(hostname, all6))
]);
return {
entries: [
...A,
...AAAA
],
cacheTtl: 0
};
return {
entries: [
...A,
...AAAA
],
cacheTtl: 0
};
} catch {
return {
entries: [],
cacheTtl: 0
};
}
}

@@ -299,0 +306,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc