I’m getting this error when trying just a very basic example from your readme. When I console.log(WhoisParser) says it’s a {default: [Function: WhoisParser] }. Thanks for the help.
TypeError: WhoisParser is not a constructor
at file:///Users/rlarmore/localwhois/index.js:25:21
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)
const filterFunction = (object) => {
// A function that returns true or false, used to filter the results
// Make this function as selective as possible, since the amount of whois data
// can be overwhelming.
}
// The fields you want to see in the object. Use null to get all the fields
const fields = ["inetnum", "inet6num", "remarks"];
new WhoisParser({ repos: ["ripe", "lacnic", "apnic", "afrinic", "arin"] })
.getObjects(["inetnum", "inet6num"], filterFunction, fields)
.then(objects => {
// Do something with the objects (array)
});
I’m getting this error when trying just a very basic example from your readme. When I console.log(WhoisParser) says it’s a {default: [Function: WhoisParser] }. Thanks for the help.
TypeError: WhoisParser is not a constructor at file:///Users/rlarmore/localwhois/index.js:25:21 at ModuleJob.run (node:internal/modules/esm/module_job:234:25) at async ModuleLoader.import (node:internal/modules/esm/loader:473:24) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)