Socket
Socket
Sign inDemoInstall

@helios-interactive/babbler

Package Overview
Dependencies
602
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @helios-interactive/babbler

Minimal email domain spellchecker. Calculates Levenshtein distance to included list of domains for errors. Returns the most relevant match.


Version published
Maintainers
1
Created

Readme

Source

Babbler

Minimal email domain spellchecker. Calculates Levenshtein distance to included list of domains for errors. Returns the most relevant match.

Install

npm i -S babbler

Plain Jane

<script src="./node_modules/babbler/dist/babbler.min.js"></script>

CommonJS

const Babbler = require('babbler');

AMD

define(['babbler'], function(Babbler){

});

ES6

import Babbler from './node_modules/babbler/src/index.js'

Usage

Check

Check if the email is spelled correctly. Returns the closest match.

Incorrect spelling

Babbler.Check('michael@gnail.com');
// {suggestion: 'michael@gmail.com', domain: 'gmail.com' distance: 1}

Correct spelling

Babbler.Check('michael@gmail.com');
// true

Invalid email address

Babbler.Check('michaelgmail.com');
// false

Domains

Append, overwrite, or get the domains list babbler checks against.

Append

Babbler.Domains(['something.co']);

Overwrite

Babbler.Domains(['something.co'], true);

Get

Babbler.Domains();

FAQs

Last updated on 04 Jul 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc