email-misspelled
Advanced tools
Comparing version 3.3.2-canary.0 to 3.3.2-canary.1
@@ -1,1 +0,1 @@ | ||
!function(e,n){for(var t in n)e[t]=n[t]}(exports,function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";t.r(n),t.d(n,"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]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(t){var r=e.length-t.length;return r<=n&&r>=-n}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(t){for(var r=Array(e.length+1).fill(null).map((function(){return Array(t.suggest.length+1).fill(null)})),o=0;o<=t.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<=t.suggest.length;l+=1){var a=t.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]+a)}return t.misspelledCount=r[e.length][t.suggest.length],t.misspelledCount<=n}},l=function(e){return{suggest:e,corrected:"",original:"",misspelledCount:0}},a=function(e){return function(n){return e&&n.suggest?(n.corrected=e.replace(/@.*$/,"@".concat(n.suggest)),n.original=e,n):n}},f=function(e,n){return e.misspelledCount-n.misspelledCount},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{lengthDiffMax:3,maxMisspelled:2,domains:[]},n=e.lengthDiffMax,t=void 0===n?3:n,s=e.maxMisspelled,c=void 0===s?2:s,g=e.domains;if(!g||!Array.isArray(g)||!g.length)throw new Error("Please provide a domain list");return function(e){if(!r(e))return[];var n=o(e);if(g.includes(n))return[];var s=u(n,t),d=i(n,c),v=a(e),p=g.filter(s).map(l).filter(d).map(v).sort(f);return p.length?p:[]}};n.default=s}])); | ||
!function(e,n){for(var r in n)e[r]=n[r]}(exports,function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=0)}([function(e,n,r){"use strict";r.r(n),r.d(n,"emailMisspelled",(function(){return d}));var t=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]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(r){var t=e.length-r.length;return t<=n&&t>=-n}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(r){for(var t=Array(e.length+1).fill(null).map((function(){return Array(r.suggest.length+1).fill(null)})),o=0;o<=r.suggest.length;o+=1)t[0][o]=o;for(var i=0;i<=e.length;i+=1)t[i][0]=i;for(var l=1;l<=e.length;l+=1)for(var u=1;u<=r.suggest.length;u+=1){var a=r.suggest[u-1]===e[l-1]?0:1;t[l][u]=Math.min(t[l][u-1]+1,t[l-1][u]+1,t[l-1][u-1]+a)}return r.misspelledCount=t[e.length][r.suggest.length],r.misspelledCount<=n}},u=function(e){return{suggest:e,corrected:"",original:"",misspelledCount:0}},a=function(e){return function(n){return e&&n.suggest?(n.corrected=e.replace(/@.*$/,"@".concat(n.suggest)),n.original=e,n):n}},s=function(e,n){return e.misspelledCount-n.misspelledCount},f={lengthDiffMax:3,maxMisspelled:2,domains:[]},c=[],d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=e.lengthDiffMax,r=void 0===n?3:n,d=e.maxMisspelled,g=void 0===d?2:d,p=e.domains,v=void 0===p?[]:p;if(!v||!Array.isArray(v)||!v.length)throw new Error("Please provide a domain list (for example: https://github.com/sl-julienamblard/email-misspelled/tree/master/src/domains)");return function(e){if(!e||!t(e))return c;var n=o(e);if(v.includes(n))return c;var f=i(n,r),d=l(n,g),p=a(e);return v.filter(f).map(u).filter(d).map(p).sort(s)}};n.default=d}])); |
@@ -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: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}])})); | ||
!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 d}));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}},l=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 l=1;l<=e.length;l+=1)for(var u=1;u<=n.suggest.length;u+=1){var f=n.suggest[u-1]===e[l-1]?0:1;r[l][u]=Math.min(r[l][u-1]+1,r[l-1][u]+1,r[l-1][u-1]+f)}return n.misspelledCount=r[e.length][n.suggest.length],n.misspelledCount<=t}},u=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={lengthDiffMax:3,maxMisspelled:2,domains:[]},c=[],d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=e.lengthDiffMax,n=void 0===t?3:t,d=e.maxMisspelled,g=void 0===d?2:d,p=e.domains,v=void 0===p?[]:p;if(!v||!Array.isArray(v)||!v.length)throw new Error("Please provide a domain list (for example: https://github.com/sl-julienamblard/email-misspelled/tree/master/src/domains)");return function(e){if(!e||!r(e))return c;var t=o(e);if(v.includes(t))return c;var s=i(t,n),d=l(t,g),p=f(e);return v.filter(s).map(u).filter(d).map(p).sort(a)}};t.default=d}])})); |
@@ -86,3 +86,3 @@ { | ||
}, | ||
"version": "3.3.2-canary.0" | ||
"version": "3.3.2-canary.1" | ||
} |
@@ -10,3 +10,3 @@ <h2 align="center">email-misspelled</h2> | ||
[![npm](https://img.shields.io/npm/dt/email-misspelled.svg?style=flat-square)](https://www.npmjs.com/package/email-misspelled) | ||
[![npm](https://img.shields.io/npm/l/email-misspelled.svg?style=flat-square)](https://github.com/sl-julienamblard/email-misspelled/blob/master/LICENSE) | ||
[![npm](https://img.shields.io/npm/l/email-misspelled.svg?style=flat-square)](https://github.com/sl-julienamblard/email-misspelled/blob/v3/LICENSE) | ||
@@ -57,3 +57,3 @@ </div> | ||
```js | ||
```ts | ||
import emailMisspelled, { top100 } from "email-misspelled" | ||
@@ -104,3 +104,3 @@ | ||
```js | ||
```ts | ||
import emailMisspelled from "email-misspelled" | ||
@@ -130,3 +130,3 @@ const emailChecker = emailMisspelled({ domains: ["random.org"] }) | ||
- [Outlook](https://github.com/sl-julienamblard/email-misspelled/blob/v3/src/domains/outlook.ts) | ||
- [Microsoft (a combination of hotmail, live and outlook emails](https://github.com/sl-julienamblard/email-misspelled/blob/v3/src/domains/microsoft.ts) | ||
- [Microsoft (a combination of hotmail, live and outlook emails)](https://github.com/sl-julienamblard/email-misspelled/blob/v3/src/domains/microsoft.ts) | ||
- [Yahoo](https://github.com/sl-julienamblard/email-misspelled/blob/v3/src/domains/yahoo.ts) | ||
@@ -137,5 +137,7 @@ - [Aol](https://github.com/sl-julienamblard/email-misspelled/blob/v3/src/domains/aol.ts) | ||
[More details here](https://github.com/sl-julienamblard/email-misspelled/blob/v3/src/domains/) | ||
**examples** | ||
```js | ||
```ts | ||
import { top100, hotmail, live } from "email-misspelled" | ||
@@ -146,3 +148,3 @@ ``` | ||
```js | ||
```ts | ||
import { top100, hotmail, live } from "email-misspelled/domains" | ||
@@ -154,3 +156,3 @@ //etc | ||
```js | ||
```ts | ||
import top100 from "email-misspelled/domains/popular" | ||
@@ -174,3 +176,3 @@ import hotmail from "email-misspelled/domains/hotmail" | ||
```js | ||
```ts | ||
import emailMisspelled, { top100 } from "email-misspelled" | ||
@@ -226,3 +228,3 @@ const emailChecker1 = emailMisspelled({ maxMisspelled: 1, domains: top100 }) | ||
```js | ||
```ts | ||
import emailMisspelled, { top100 } from "email-misspelled" | ||
@@ -229,0 +231,0 @@ const emailChecker1 = emailMisspelled({ lengthDiffMax: 1, domains: top100 }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47945
442