Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caa

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caa - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

19

index.js
"use strict";
const net = require("net");
const dnsSocket = require("dns-socket");
const socket = dnsSocket();
const resolve = ({name, server, port}) => {
console.log("resolve", name);
const resolve = ({name, socket, server, port}) => {
return new Promise(resolve => {

@@ -27,11 +24,7 @@ socket.query({questions: [{name, type: "CAA"}]}, port, server, (_, res) => {

let server;
if (opts.server && net.isIP(server)) {
if (opts.server) {
server = opts.server;
} else {
const servers = require("dns").getServers();
if (servers || servers[0]) {
server = servers[0];
} else {
server = "8.8.8.8";
}
server = (servers && servers[0]) ? servers[0] : "8.8.8.8";
}

@@ -48,5 +41,7 @@

let caa;
const socket = dnsSocket();
while (name && !caa) {
try {
caa = await resolve({name, server, port});
caa = await resolve({name, socket, server, port});
} catch (err) {}

@@ -56,3 +51,5 @@ name = name.split(".").splice(1).join(".");

socket.destroy();
return caa || null;
};
{
"name": "caa",
"version": "1.0.0",
"version": "1.0.1",
"description": "rfc6844-conform CAA record lookup",

@@ -27,6 +27,6 @@ "author": "silverwind <me@silverwind.io>",

"devDependencies": {
"eslint": "^4.19.1",
"eslint-config-silverwind": "^1.0.42",
"updates": "^3.0.0"
"eslint": "^5.2.0",
"eslint-config-silverwind": "^1.0.45",
"updates": "^4.1.2"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc