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.2.0 to 1.2.1

9

index.js

@@ -29,5 +29,3 @@ "use strict";

// resolve a CAA record, possibly via recursion
const resolve = async ({name, socket, server, port}) => {
const query = util.promisify(socket.query.bind(socket));
const resolve = async ({name, query, server, port}) => {
const [cname, dname, caa] = await Promise.all([

@@ -61,3 +59,3 @@ query({questions: [{name, type: "CNAME"}]}, port, server).then(parseAnswers).catch(noop),

const parent = parts.splice(1).join(".");
return await resolve({name: parent, socket, server, port});
return await resolve({name: parent, query, server, port});
} else {

@@ -83,4 +81,5 @@ return [];

const socket = dnsSocket();
const query = util.promisify(socket.query.bind(socket));
const port = opts.port || 53;
const caa = await resolve({name, socket, server, port});
const caa = await resolve({name, query, server, port});
socket.destroy();

@@ -87,0 +86,0 @@ return caa || [];

{
"name": "caa",
"version": "1.2.0",
"version": "1.2.1",
"description": "rfc6844-conform CAA record lookup",

@@ -5,0 +5,0 @@ "author": "silverwind <me@silverwind.io>",

@@ -17,6 +17,6 @@ # caa

console.log(await caa('subdomain.example.com'));
caa('subdomain.example.com').then(console.log);
// => [{flags: 0, tag: 'issue', tag: 'issue', value: 'letsencrypt.org', issuerCritical: false}]
console.log(await caa.matches('subdomain.example.com', 'letsencrypt.org'));
caa.matches('subdomain.example.com', 'letsencrypt.org').then(console.log);
// => true

@@ -23,0 +23,0 @@

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