Code Monkey home page Code Monkey logo

academicemailverifier's Introduction

Academic Email Verifier

Identifies email addresses or domains names that belong to colleges or universities. Retrieves institution name and owner role (i.e. faculty, student) if available. ๐ŸŒŒ Service Demo.

licence npm version

Installation

npm install --save academic-email-verifier

Usage

Import library:

import { Verifier } from 'academic-email-verifier';

Verify academic email address asynchronically:

// check if email address is a valid academic email address
let isAcademic = await Verifier.isAcademic('[email protected]');

Get full institution name asynchronically:

// get full institution name
let institutionName = await Verifier.getInstitutionName('[email protected]');

Supported Environments

  • ๐Ÿ–ฅ Node.js

Documentation

Support

If you're having any problem, please raise an issue on GitHub and we'll be happy to help.

Contribute

Before submitting a pull request, please make sure that you include tests, and that jshint runs without any warnings: Download VSCode extension.

Test

Run the test suite by executing:

$ npm test

Attribution

The database of this project is based on the ruby gem swot database. this database constitutes a significant part of this project.


Author: Benny Megidish.

academicemailverifier's People

Contributors

bennymeg avatar dependabot[bot] avatar joelshepherd avatar zenineasa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

academicemailverifier's Issues

Files missing

Hello,

Two files are missing in the package I installed via npm: 'fs' and 'path' who are required in './node_modules/academic-email-verifier/index.js'. Do I miss something?

Handling failed lookups?

I tested a random email address ([email protected]) and received the following error:

node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);

[Error: ENOENT: no such file or directory, open '/Development/test/node_modules/academic-email-verifier/domains/com/me.txt'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Development/test/node_modules/academic-email-verifier/domains/com/me.txt'
}

error Command failed with exit code 1.

I checked your database files and saw there was indeed nothing there... It seems that getInstitutionName doesn't gracefully fail and crashes Node. Can you add some error checking?

My workaround is:

  const isAcademic = await Verifier.isAcademic(email);
  let collegeName: string | undefined;
  if (isAcademic) {
    const institutionName = await Verifier.getInstitutionName(email);
    collegeName = institutionName !== '' ? institutionName : undefined
  }

How to use this npm?

Hi,

When I use:
const verifier = require('academic-email-verifier');
let isAcademic = await verifier.isAcademic(email);

terminal will raise these error:
UnhandledPromiseRejectionWarning: TypeError: verifier.isAcademic is not a function

It means isAcademic is not a function, and when I use:
import { Verifier } from 'academic-email-verifier';

the error will be:
import { Verifier } from 'academic-email-verifier';
^^^^^^

SyntaxError: Cannot use import statement outside a module

How can I solve it?

Thank you!

Can't resolve the module

screen shot 2019-01-14 at 11 13 24 pm

i installed it like 3 times, but i still get this error. I know the module is there, because i can see it. Anyone have a solution?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.