To issue a whois query invoke the Whois#query method passing in the query command as an argument.
Example
// get information on sun.com domain
whois.query("sun.com");