Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

swot-simple

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swot-simple

detect whether an email address is under an edu domain

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

swot-simple

build status

Simple & fast JavaScript implementation of Swot

  • only depends on tldjs
  • compiles swot data into a single json file, so bootup is fast
  • passes all of Swot's tests.
  • fast

Install

npm install swot-simple

API

isAcademic(email)

Check an email for whether it is from an educational domain or not.

Parameters

parametertypedescription
emailStringa full email address

Example

swot.isAcademic('me@gmail.com'); // false
swot.isAcademic('lee@harvard.edu'); // true

getInstitutionName(email)

Check an email for whether it is from an educational domain or not, and if it is a known educational institution, return its name.

Parameters

parametertypedescription
emailStringa full email address

Example

swot.getInstitutionName('lreilly@cs.strath.ac.uk');
// "lreilly@cs.strath.ac.uk"

Build Process

swot's main data is transformed by build.js. The list of tlds is transformed from the Ruby to json by hand.

Keywords

swot

FAQs

Package last updated on 31 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts