mirror of
https://github.com/jakejarvis/rdapper.git
synced 2026-09-23 01:25:31 -04:00
Rename lookupDomain() to lookup() (with backwards compatibility)
This commit is contained in:
+3
-3
@@ -6,14 +6,14 @@
|
||||
// echo "example.com" | npx rdapper
|
||||
|
||||
import { createInterface } from "node:readline";
|
||||
import { lookupDomain } from "../dist/index.js";
|
||||
import { lookup } from "../dist/index.js";
|
||||
|
||||
async function main() {
|
||||
if (process.argv.length > 2) {
|
||||
// URL(s) specified in the command arguments
|
||||
console.log(
|
||||
JSON.stringify(
|
||||
await lookupDomain(process.argv[process.argv.length - 1]),
|
||||
await lookup(process.argv[process.argv.length - 1]),
|
||||
null,
|
||||
2,
|
||||
),
|
||||
@@ -24,7 +24,7 @@ async function main() {
|
||||
input: process.stdin,
|
||||
});
|
||||
rlInterface.on("line", async (line) => {
|
||||
console.log(JSON.stringify(await lookupDomain(line), null, 2));
|
||||
console.log(JSON.stringify(await lookup(line), null, 2));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user