/** * Unpacked dataset used at runtime. * * @property {Map} institutions Map from registered domain * (e.g., "stanford.edu") to one or more official institution names. * @property {Set} stoplist Domains/subdomains that should not be considered academic. * @property {Set} tlds Academic/public-suffix TLDs (e.g., "edu", "ac.uk"). */ export type SwotData = { institutions: Map; stoplist: Set; tlds: Set; }; /** * Check if the host is under a known academic/public-suffix TLD * (e.g., "edu", "ac.uk"). * * @param {string} emailOrDomain Email address, bare domain, or full URL. * @returns {boolean} True if any domain suffix matches a known academic TLD. * @example * isUnderTLD('prof@university.edu'); // true (if "edu" is in TLDs) */ export declare function isUnderTLD(emailOrDomain: string): boolean; /** * Check if the host is in the stoplist * * @param {string} emailOrDomain Email address, bare domain, or full URL. * @returns {boolean} True if any domain suffix is stoplisted. * @example * isStoplisted('user@stoplisted.edu'); // true (if "stoplisted.edu" is in stoplist) */ export declare function isStoplisted(emailOrDomain: string): boolean; /** * Get institution names associated with the host. * Returns a new array; returns [] if none found. * * @param {string} emailOrDomain Email address, bare domain, or full URL. * @returns {string[]} Institution names for the first matching suffix. * @example * findSchoolNames('alice@cs.stanford.edu'); // ["Stanford University"] */ export declare function findSchoolNames(emailOrDomain: string): string[]; /** * Check if an email address is an academic email address. * * @param {string} email Email address to test. * @returns {boolean} True if the email is valid and not stoplisted, and * either under a known academic TLD or associated with a known institution. * @example * isAcademic('jane.doe@ox.ac.uk'); // true (if "ac.uk" or domain is known) */ export declare function isAcademic(email: string): boolean; /** * Metadata about the dataset (e.g., version and counts). * * @see ./swot-metadata.js */ export { SWOT_METADATA } from './swot-metadata.js';