npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

swot-node

v2.0.1375

Published

🏫 Identify email addresses or domains names that belong to colleges or universities. Help automate the process of approving or rejecting academic discounts.

Downloads

22,851

Readme

Swot 🍎

Node.js CI Package Quality Dependencies Downloads Last commit

If you have a product or service and offer academic discounts, there's a good chance there's some manual component to the approval process. Perhaps .edu email addresses are automatically approved because, for the most part at least, they're associated with American post-secondary educational institutions. Perhaps .ac.uk email addresses are automatically approved because they're guaranteed to belong to British universities and colleges. Unfortunately, not every country has an education-specific TLD (Top Level Domain) and plenty of schools use .com or .net.

Swot is a community-driven or crowdsourced library for verifying that domain names and email addresses are tied to a legitimate university of college - more specifically, an academic institution providing higher education in tertiary, quaternary or any other kind of post-secondary education in any country in the world.

If you would like to add your school/educational institution, please create a pull request in this repository. Jetbrains/swot does not provide source code to this library, but is included as the dataset as it contains thousands of schools and the team at Jetbrains is verifying and adding many schools every day. A new version of swot-node with an updated dataset is automatically published to NPM every 24 hours.

Installation

Add swot-node like other NPM packages, simply run:

yarn add swot-node

or

npm install swot-node

Usage

Verify Email Addresses

const swot = require("swot-node")

await swot.isAcademic('[email protected]')           // true
await swot.isAcademic('[email protected]')           // true
await swot.isAcademic('[email protected]')  // true
await swot.isAcademic('[email protected]')                   // true
await swot.isAcademic('[email protected]')                 // true
await swot.isAcademic('[email protected]')               // false

Verify Domain Names

const swot = require("swot-node")

await swot.isAcademic('harvard.edu')              // true
await swot.isAcademic('www.harvard.edu')          // true
await swot.isAcademic('http://www.harvard.edu')   // true
await swot.isAcademic('http://www.github.com')    // false
await swot.isAcademic('http://www.rangers.co.uk') // false

Get all the different names of a school

const swot = require("swot-node")

await swot.getSchoolNames('www.bbs1-gifhorn.de')
// => [ "BBS1 Gifhorn", "Berufsbildene Schule 1 Gifhorn" ]

await swot.getSchoolNames('stanford.edu')
// => [ "Stanford University" ]

Find School Name

const swot = require("swot-node")

await swot.getSchoolName('[email protected]')
// => "University of Strathclyde"

await swot.getSchoolName('http://www.stanford.edu')
// => "Stanford University"

await swot.getSchoolName('https://www.github.com')
// => false

await swot.getSchoolName('QaPk59GZ9Zv8.edu')
// => true

License

Apache 2.0

Copyright (c) 2021 Marvin Schopf

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

See Also

  • swot - original ruby version of swot
  • gman - like swot, but for government emails
  • swotphp - PHP port of Swot
  • swot-clj - Clojure port of Swot
  • swot - Go port of Swot