Version(s) affected: 1.18.0
Description
$ whois not-exist-bust.com
No match for domain "NOT-EXIST-BUST.COM".
>>> Last update of whois database: 2024-11-05T12:37:37Z <<<
How to reproduce
import * as whoiser from 'whoiser';
console.log(await whoiser.domain(domain));
It should log an empty object, but whoiser is trying to parse the not found message instead.
Possible Solution
Update this line to include No match for:
|
if (whois.includes('returned 0 objects') || whois.includes('No match found')) { |