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 9.2.0 to 10.0.0

10

dist/index.d.ts

@@ -9,4 +9,10 @@ type CaaOpts = {

};
export declare function caa(name: any, opts?: CaaOpts): Promise<any>;
export declare function caaMatches(name: any, ca: any, opts?: {}): Promise<any>;
type CaaRecord = {
flags: number;
tag: string;
value: string;
issuerCritical: boolean;
};
export declare function caa(name: string, opts?: CaaOpts): Promise<CaaRecord[]>;
export declare function caaMatches(name: string, ca: string, opts?: CaaOpts): Promise<boolean>;
export {};

10

dist/index.js

@@ -18,3 +18,5 @@ import { getServers } from "node:dns";

const parent = (name) => name.split(".").splice(1).join(".");
const selectServer = (servers, retries, tries) => servers[(tries - retries) % servers.length];
function selectServer(servers, retries, tries) {
return servers[(tries - retries) % servers.length];
}
function normalizeName(name = "") {

@@ -83,4 +85,2 @@ name = name.toLowerCase();

async function caa(name, opts = {}) {
if (typeof name !== "string")
throw new Error(`Expected a string for 'name', got ${name}`);
name = normalizeName(name);

@@ -109,6 +109,2 @@ if (!opts.servers) {

async function caaMatches(name, ca, opts = {}) {
if (typeof name !== "string")
throw new Error(`Expected a string for 'name', got ${name}`);
if (typeof ca !== "string")
throw new Error(`Expected a string for 'ca', got ${ca}`);
name = normalizeName(name);

@@ -115,0 +111,0 @@ ca = normalizeName(ca);

{
"name": "caa",
"version": "9.2.0",
"version": "10.0.0",
"description": "rfc6844-conform CAA record lookup and validation",

@@ -24,4 +24,2 @@ "author": "silverwind <me@silverwind.io>",

"devDependencies": {
"@babel/eslint-parser": "7.24.5",
"@babel/plugin-syntax-import-assertions": "7.24.1",
"@types/node": "20.12.12",

@@ -28,0 +26,0 @@ "eslint": "8.57.0",

@@ -14,5 +14,4 @@ # caa

await caa.matches("example.com", "letsencrypt.org");
await caaMatches("example.com", "letsencrypt.org");
// => true
```

@@ -19,0 +18,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