From de2f0bf3963dc6ae51c5b0280decef193d272c30 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 23 Jan 2025 15:30:50 +0900 Subject: [PATCH] updated: readme --- README.md | 12 ++++++------ examples/a-records.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4647191..49cce26 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,13 @@ **@layered/dns-records** is a DNS helper library than can quickly discover and retrieve all DNS records for a domain. -* Retrieves DNS records for a domain -* Discovers (almost) all A, AAAA, CNAME, and TXT for a domain +* Retrieves DNS records for any domain name +* Discovers (almost) all A, AAAA, CNAME, and TXT for a domain, with option to specify extra subdomains * Detects wildcard `*` records -* Option to specify extra subdomains to check for * Provides results in common format, see `DnsRecord` * Works in all JavaScript runtimes: Browsers, Node.js, CloudFlare Workers, Deno, Bun, etc -→ See it in action here https://dmns.app +→ See it in action here https://dmns.app ・ https://chromewebstore.google.com/detail/domain-info/afbepfhknfficaflckmgflbmklcleidl ## Getting Started @@ -47,7 +46,7 @@ Here is the list of supported DNS resolvers: ## Client API - [`getDnsRecords(hostname: string, type: string = 'A', resolver?)`](#dns-records-by-type) - Get DNS records for a hostname - [`getAllDnsRecords(domain: string, options: GetAllDnsRecordsOptions)`](#all-dns-records) - Get all DNS records for a domain -- [`getAllDnsRecordsStream(domain: string, options): ReadableStream`](#all-dns-records-stream) +- [`getAllDnsRecordsStream(domain: string, options): ReadableStream`](#all-dns-records-stream) - Get all DNS records for a domain, streaming them as they're discovered #### DNS Records by type @@ -57,7 +56,7 @@ Here is the list of supported DNS resolvers: |-----|---|---|---| |name |string| |hostname. Ex: `'x.com'` or `email.apple.com`| |type |string|`A`|record type: Ex: `'TXT'`, `'MX'`, `'CNAME'`| -|resolver |string| |DNS resolver to use, see resolvers above. If not set, the best match for current runtime will be used| +|resolver |string|best for current runtime|DNS resolver to use, see resolvers above| ```js import { getDnsRecords } from '@layered/dns-records' @@ -95,6 +94,7 @@ import { getAllDnsRecords } from '@layered/dns-records' const allRecords = await getAllDnsRecords('x.com', { resolver: 'cloudflare-dns', commonSubdomainsCheck: true, + subdomains: ['extra-subdomain-to-check-for'], }) console.log('DNS all records', allRecords) ``` diff --git a/examples/a-records.ts b/examples/a-records.ts index 8f1eb95..06597db 100644 --- a/examples/a-records.ts +++ b/examples/a-records.ts @@ -1,4 +1,4 @@ -import { DnsRecord, getDnsRecords } from '../src/index.ts' +import { type DnsRecord, getDnsRecords } from '../src/index.ts' const domain = 'apple.com'