email-misspelled
Advanced tools
Comparing version 3.2.3 to 3.3.0-canary.1
@@ -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]}}(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}])})); |
@@ -27,3 +27,3 @@ { | ||
"/lib/emailMisspelled.d.ts", | ||
"/lib/emailMisspelled.node.js", | ||
"/lib/emailMisspelled.web.js", | ||
"/lib/domains", | ||
@@ -87,3 +87,3 @@ "/lib/typings", | ||
}, | ||
"version": "3.2.3" | ||
"version": "3.3.0-canary.1" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
47776
1