@zydon/common 2.2.90 → 2.2.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ var h=t=>{if(!t||(t=t?.replace(/[^\d]+/g,""),t.length!==11||t==="00000000000"||t==="11111111111"||t==="22222222222"||t==="33333333333"||t==="44444444444"||t==="55555555555"||t==="66666666666"||t==="77777777777"||t==="88888888888"||t==="99999999999"))return !1;let e=0;for(let s=0;s<9;s++)e+=parseInt(t.charAt(s))*(10-s);let r=11-e%11;if((r===10||r===11)&&(r=0),r!==parseInt(t.charAt(9)))return !1;e=0;for(let s=0;s<10;s++)e+=parseInt(t.charAt(s))*(11-s);return r=11-e%11,(r===10||r===11)&&(r=0),r===parseInt(t.charAt(10))},o=t=>{if(!t||(t=t.replace(/[^\d]+/g,""),t.length!==14)||t==="00000000000000"||t==="11111111111111"||t==="22222222222222"||t==="33333333333333"||t==="44444444444444"||t==="55555555555555"||t==="66666666666666"||t==="77777777777777"||t==="88888888888888"||t==="99999999999999")return !1;let e=t.length-2,r=t.substring(0,e),s=t.substring(e),a=0,l=e-7;for(let i=e;i>=1;i--)a+=parseInt(r.charAt(e-i))*l--,l<2&&(l=9);let n=a%11<2?0:11-a%11;if(n!==parseInt(s.charAt(0)))return !1;e+=1,r=t.substring(0,e),a=0,l=e-7;for(let i=e;i>=1;i--)a+=parseInt(r.charAt(e-i))*l--,l<2&&(l=9);return n=a%11<2?0:11-a%11,n===parseInt(s.charAt(1))},f=(t="")=>t?!!t.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/):!1,g=(t="",e=[8,20],r=!1,s=!1,a=!1)=>{let l=t.length>=e[0]&&t.length<=e[1],n=!a||/[A-Z]/.test(t),i=!s||/[!@#$%^&*(),.?":{}|<>]/.test(t),u=!r||/\d/.test(t);return {isLengthValid:l,hasUpperCaseChar:n,hasSpecialCharacter:i,hasNumberChar:u}};
2
+
3
+ export { h as a, o as b, f as c, g as d };
@@ -1,4 +1,4 @@
1
- import { d } from '../../chunk-7EYDVDC4.js';
1
+ import { d } from '../../chunk-CQDKXUUX.js';
2
2
  import { a as a$1 } from '../../chunk-VU4X2T7Q.js';
3
3
  import '../../chunk-IH253O3C.js';
4
4
  import a from '@mui/material/Typography';
@@ -1,5 +1,5 @@
1
1
  import { a } from '../../../chunk-VTHBHXM2.js';
2
- import { d } from '../../../chunk-7EYDVDC4.js';
2
+ import { d } from '../../../chunk-CQDKXUUX.js';
3
3
  import { a as a$1 } from '../../../chunk-VU4X2T7Q.js';
4
4
  import '../../../chunk-IH253O3C.js';
5
5
  import { useState } from 'react';
@@ -1 +1 @@
1
- export { b as cnpjIsValid, a as cpfIsValid, c as emailIsValid, d as validatePassword } from '../chunk-7EYDVDC4.js';
1
+ export { b as cnpjIsValid, a as cpfIsValid, c as emailIsValid, d as validatePassword } from '../chunk-CQDKXUUX.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.2.90",
3
+ "version": "2.2.91",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,3 +0,0 @@
1
- var h=t=>{if(!t||(t=t?.replace(/[^\d]+/g,""),t.length!==11||t==="00000000000"||t==="11111111111"||t==="22222222222"||t==="33333333333"||t==="44444444444"||t==="55555555555"||t==="66666666666"||t==="77777777777"||t==="88888888888"||t==="99999999999"))return !1;let e=0;for(let s=0;s<9;s++)e+=parseInt(t.charAt(s))*(10-s);let r=11-e%11;if((r===10||r===11)&&(r=0),r!==parseInt(t.charAt(9)))return !1;e=0;for(let s=0;s<10;s++)e+=parseInt(t.charAt(s))*(11-s);return r=11-e%11,(r===10||r===11)&&(r=0),r===parseInt(t.charAt(10))},g=t=>{if(!t||(t=t.replace(/[^\d]+/g,""),t.length!==14)||t==="00000000000000"||t==="11111111111111"||t==="22222222222222"||t==="33333333333333"||t==="44444444444444"||t==="55555555555555"||t==="66666666666666"||t==="77777777777777"||t==="88888888888888"||t==="99999999999999")return !1;let e=t.length-2,r=t.substring(0,e),s=t.substring(e),a=0,i=e-7;for(let l=e;l>=1;l--)a+=parseInt(r.charAt(e-l))*i--,i<2&&(i=9);let o=a%11<2?0:11-a%11;if(o!==parseInt(s.charAt(0)))return !1;e+=1,r=t.substring(0,e),a=0,i=e-7;for(let l=e;l>=1;l--)a+=parseInt(r.charAt(e-l))*i--,i<2&&(i=9);return o=a%11<2?0:11-a%11,o===parseInt(s.charAt(1))},u=["com","org","net","edu","gov","mil","int","info","biz","name","museum","coop","aero","pro","cat","jobs","mobi","travel","xxx","asia","tel","post","onion","apple","google","amazon","xyz","top","site","online","club","shop","vip","app","dev","store","tech","blog","art","io","ai"],f=(t="")=>{if(!t)return !1;let e=t.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),r=e?e[1].toLowerCase():"";return u.includes(r)?!!e:!1},d=(t="",e=[8,20],r=!1,s=!1,a=!1)=>{let i=t.length>=e[0]&&t.length<=e[1],o=!a||/[A-Z]/.test(t),l=!s||/[!@#$%^&*(),.?":{}|<>]/.test(t),n=!r||/\d/.test(t);return {isLengthValid:i,hasUpperCaseChar:o,hasSpecialCharacter:l,hasNumberChar:n}};
2
-
3
- export { h as a, g as b, f as c, d };