is-academic-email
v1.0.21
Published
Fast academic email validation using the JetBrains swot database
Downloads
469
Maintainers
Readme
is-academic-email
A lightweight Node.js utility for detecting academic email addresses and domains, powered by the swot dataset.
Installation
Using npm:
npm install is-academic-emailUsing pnpm:
pnpm add is-academic-emailQuick start
import {
isAcademic,
isUnderTLD,
isStoplisted,
findSchoolNames,
} from 'is-academic-email';
isAcademic('[email protected]'); // true ("ox.ac.uk" is a known academic domain)
isAcademic('[email protected]'); // false ("gmail.com" is not academic)
isUnderTLD('[email protected]'); // true ("edu.ee" is a known academic TLD)
isStoplisted('https://mail.america.edu'); // true ("america.edu" is stoplisted)
findSchoolNames('[email protected]'); // ["Stanford University"]API
isAcademic(email: string): boolean
Returns true if the email is valid and not stoplisted, and either under a known academic TLD or associated with a known institution.
isUnderTLD(input: string): boolean
Returns true if the host is under a known academic/public-suffix TLD (supports compound TLDs like ac.uk).
isStoplisted(input: string): boolean
Returns true if the host matches a known stoplisted domain.
findSchoolNames(input: string): string[]
Returns institution names associated with the host (empty array if none).
SWOT_METADATA
Metadata about the dataset (e.g., version and record counts).
