Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zootools/email-spell-checker

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zootools/email-spell-checker - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

17

dist/lib/helpers/encode-email.js

@@ -6,13 +6,16 @@ "use strict";

// http://en.wikipedia.org/wiki/Email_address#Syntax
//
// We have to replace all the possible characters.
// that's why we use a regex with a global flag.
function encodeEmail(email) {
const result = encodeURI(email)
.replace('%20', ' ')
.replace('%25', '%')
.replace('%5E', '^')
.replace('%60', '`')
.replace('%7B', '{')
.replace('%7C', '|')
.replace('%7D', '}');
.replace(/%20/g, ' ')
.replace(/%25/g, '%')
.replace(/%5E/g, '^')
.replace(/%60/g, '`')
.replace(/%7B/g, '{')
.replace(/%7C/g, '|')
.replace(/%7D/g, '}');
return result;
}
exports.default = encodeEmail;

@@ -0,2 +1,7 @@

/**
* Just in case a browser doesn't support .trim
* Copied from https://github.com/Trott/trim
* Credits to them
*/
declare function trim(str: string): string;
export default trim;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const WHITESPACE_PATTERN = /\s/;
/**
* Just in case a browser doesn't support .trim
* Copied from https://github.com/Trott/trim
* Credits to them
*/
function trim(str) {
// trim() not exist in old IE!
return str.replace(/^\s*/, '').replace(/\s*$/, '');
if (str.trim) {
return str.trim();
}
return right(left(str));
}
function left(str) {
if (str.trimLeft)
return str.trimLeft();
return str.replace(/^\s\s*/, '');
}
function right(str) {
if (str.trimRight)
return str.trimRight();
let i = str.length;
while (WHITESPACE_PATTERN.test(str.charAt(--i)))
;
return str.slice(0, i + 1);
}
exports.default = trim;
{
"private": false,
"name": "@zootools/email-spell-checker",
"version": "1.8.0",
"version": "1.8.1",
"description": "mailSpellChecker.js (mail spell checker) is a lightweight module that suggests a right domain when your users misspell it in an email address",

@@ -6,0 +6,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc