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

email-misspelled

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-misspelled - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

2

lib/emailMisspelled.js

@@ -1,1 +0,1 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t),n.d(t,"emailMisspelled",(function(){return s}));var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 1===e.replace(/[^@]/g,"").length},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.includes("@")?e.replace(/.*@/,""):""},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var r=e.length-n.length;return r<=t&&r>=-t}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){for(var r=Array(e.length+1).fill(null).map((function(){return Array(n.suggest.length+1).fill(null)})),o=0;o<=n.suggest.length;o+=1)r[0][o]=o;for(var i=0;i<=e.length;i+=1)r[i][0]=i;for(var u=1;u<=e.length;u+=1)for(var l=1;l<=n.suggest.length;l+=1){var f=n.suggest[l-1]===e[u-1]?0:1;r[u][l]=Math.min(r[u][l-1]+1,r[u-1][l]+1,r[u-1][l-1]+f)}return n.misspelledCount=r[e.length][n.suggest.length],n.misspelledCount<=t}},l=function(e){return{suggest:e,corrected:"",original:"",misspelledCount:0}},f=function(e){return function(t){return e&&t.suggest?(t.corrected=e.replace(/@.*$/,"@".concat(t.suggest)),t.original=e,t):t}},a=function(e,t){return e.misspelledCount-t.misspelledCount},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{lengthDiffMax:2,maxMisspelled:2,domains:[]},t=e.lengthDiffMax,n=void 0===t?2:t,s=e.maxMisspelled,c=void 0===s?2:s,d=e.domains;if(!d||!Array.isArray(d)||!d.length)throw new Error("Please provide a domain list");return function(e){if(!r(e))return[];var t=o(e);if(d.includes(t))return[];var s=i(t,n),g=u(t,c),p=f(e),v=d.filter(s).map(l).filter(g).map(p).sort(a);return v.length?v:[]}};t.default=s}])}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t),n.d(t,"emailMisspelled",(function(){return s}));var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 1===e.replace(/[^@]/g,"").length},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.includes("@")?e.replace(/.*@/,""):""},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var r=e.length-n.length;return r<=t&&r>=-t}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){for(var r=Array(e.length+1).fill(null).map((function(){return Array(n.suggest.length+1).fill(null)})),o=0;o<=n.suggest.length;o+=1)r[0][o]=o;for(var i=0;i<=e.length;i+=1)r[i][0]=i;for(var u=1;u<=e.length;u+=1)for(var l=1;l<=n.suggest.length;l+=1){var f=n.suggest[l-1]===e[u-1]?0:1;r[u][l]=Math.min(r[u][l-1]+1,r[u-1][l]+1,r[u-1][l-1]+f)}return n.misspelledCount=r[e.length][n.suggest.length],n.misspelledCount<=t}},l=function(e){return{suggest:e,corrected:"",original:"",misspelledCount:0}},f=function(e){return function(t){return e&&t.suggest?(t.corrected=e.replace(/@.*$/,"@".concat(t.suggest)),t.original=e,t):t}},a=function(e,t){return e.misspelledCount-t.misspelledCount},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{lengthDiffMax:3,maxMisspelled:2,domains:[]},t=e.lengthDiffMax,n=void 0===t?3:t,s=e.maxMisspelled,c=void 0===s?2:s,d=e.domains;if(!d||!Array.isArray(d)||!d.length)throw new Error("Please provide a domain list");return function(e){if(!r(e))return[];var t=o(e);if(d.includes(t))return[];var s=i(t,n),g=u(t,c),p=f(e),v=d.filter(s).map(l).filter(g).map(p).sort(a);return v.length?v:[]}};t.default=s}])}));

@@ -1,1 +0,1 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(global,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t),n.d(t,"emailMisspelled",(function(){return s}));var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 1===e.replace(/[^@]/g,"").length},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.includes("@")?e.replace(/.*@/,""):""},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var r=e.length-n.length;return r<=t&&r>=-t}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){for(var r=Array(e.length+1).fill(null).map((function(){return Array(n.suggest.length+1).fill(null)})),o=0;o<=n.suggest.length;o+=1)r[0][o]=o;for(var u=0;u<=e.length;u+=1)r[u][0]=u;for(var i=1;i<=e.length;i+=1)for(var l=1;l<=n.suggest.length;l+=1){var f=n.suggest[l-1]===e[i-1]?0:1;r[i][l]=Math.min(r[i][l-1]+1,r[i-1][l]+1,r[i-1][l-1]+f)}return n.misspelledCount=r[e.length][n.suggest.length],n.misspelledCount<=t}},l=function(e){return{suggest:e,corrected:"",original:"",misspelledCount:0}},f=function(e){return function(t){return e&&t.suggest?(t.corrected=e.replace(/@.*$/,"@".concat(t.suggest)),t.original=e,t):t}},a=function(e,t){return e.misspelledCount-t.misspelledCount},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{lengthDiffMax:2,maxMisspelled:2,domains:[]},t=e.lengthDiffMax,n=void 0===t?2:t,s=e.maxMisspelled,c=void 0===s?2:s,d=e.domains;if(!d||!Array.isArray(d)||!d.length)throw new Error("Please provide a domain list");return function(e){if(!r(e))return[];var t=o(e);if(d.includes(t))return[];var s=u(t,n),g=i(t,c),p=f(e),v=d.filter(s).map(l).filter(g).map(p).sort(a);return v.length?v:[]}};t.default=s}])}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(global,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t),n.d(t,"emailMisspelled",(function(){return s}));var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 1===e.replace(/[^@]/g,"").length},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.includes("@")?e.replace(/.*@/,""):""},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var r=e.length-n.length;return r<=t&&r>=-t}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){for(var r=Array(e.length+1).fill(null).map((function(){return Array(n.suggest.length+1).fill(null)})),o=0;o<=n.suggest.length;o+=1)r[0][o]=o;for(var u=0;u<=e.length;u+=1)r[u][0]=u;for(var i=1;i<=e.length;i+=1)for(var l=1;l<=n.suggest.length;l+=1){var f=n.suggest[l-1]===e[i-1]?0:1;r[i][l]=Math.min(r[i][l-1]+1,r[i-1][l]+1,r[i-1][l-1]+f)}return n.misspelledCount=r[e.length][n.suggest.length],n.misspelledCount<=t}},l=function(e){return{suggest:e,corrected:"",original:"",misspelledCount:0}},f=function(e){return function(t){return e&&t.suggest?(t.corrected=e.replace(/@.*$/,"@".concat(t.suggest)),t.original=e,t):t}},a=function(e,t){return e.misspelledCount-t.misspelledCount},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{lengthDiffMax:3,maxMisspelled:2,domains:[]},t=e.lengthDiffMax,n=void 0===t?3:t,s=e.maxMisspelled,c=void 0===s?2:s,d=e.domains;if(!d||!Array.isArray(d)||!d.length)throw new Error("Please provide a domain list");return function(e){if(!r(e))return[];var t=o(e);if(d.includes(t))return[];var s=u(t,n),g=i(t,c),p=f(e),v=d.filter(s).map(l).filter(g).map(p).sort(a);return v.length?v:[]}};t.default=s}])}));

@@ -56,3 +56,4 @@ {

"lightweight",
"corrector"
"corrector",
"form"
],

@@ -86,3 +87,3 @@ "devDependencies": {

},
"version": "3.1.0"
"version": "3.2.0"
}

@@ -23,2 +23,4 @@ <h2 align="center">email-misspelled</h2>

![example](https://raw.githubusercontent.com/sl-julienamblard/email-misspelled/v3/doc/example.gif)
## Table of Contents

@@ -213,3 +215,3 @@

| :--- | :------- | :------ | :---------- |
| `number` | false | `2` | max length difference between two string |
| `number` | false | `3` | max length difference between two string |

@@ -216,0 +218,0 @@ <br />

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