kazu69 / domain-info Goto Github PK
View Code? Open in Web Editor NEWSimple domain information tool
Home Page: https://www.npmjs.com/package/domain-info
Simple domain information tool
Home Page: https://www.npmjs.com/package/domain-info
I am using on Nextjs. its working only on first time, but every next time, its showing timeout.
error - unhandledRejection: Error: DNS request timed out
Thanks
When I provide an options parameter, it fails and gives me an 'Invalid Query'.
Hello,
I noticed that your code is ambiguous, indeed if we us promises we should not have to do a try catch. The code should, if it is in the promised mode, reject the error instead of the throwing it.
A sample of your code:
var whois = function whois(domain, opts, cb) {
if (typeof domain !== 'string') {
throw new Error('Expected a `domain name`'); //<< HERE
}
var callback;
if (typeof opts === 'function') {
callback = opts;
} else {
callback = cb;
}
if (_tldjs.default.tldExists(domain) === false) {
throw new Error('Invalid a `domain name`'); //<< HERE
}
var encodedDomain = "".concat(encodePuny(domain)),
promise = requestWhois(encodedDomain, opts);
if (callback && typeof callback === 'function') {
promise.then(function (data) {
return callback(null, data);
}).catch(function (error) {
return callback(error, null);
});
} else {
return promise;
}
};
Thanks you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.