soff-phone 0.0.1 → 0.0.3

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.
Files changed (136) hide show
  1. package/README.md +102 -14
  2. package/dist/ar-BRemFHRv.d.ts +10 -0
  3. package/dist/ar-JxzqPct0.d.cts +10 -0
  4. package/dist/br-COFIo49r.d.cts +10 -0
  5. package/dist/br-Ct41H5gk.d.ts +10 -0
  6. package/dist/ca-C0PYBvZK.d.cts +10 -0
  7. package/dist/ca-CNnuf6qY.d.ts +10 -0
  8. package/dist/cl-BSQlXUww.d.cts +10 -0
  9. package/dist/cl-W_f2Hza8.d.ts +10 -0
  10. package/dist/cr-C3m9H-RU.d.cts +10 -0
  11. package/dist/cr-UzSwttKD.d.ts +10 -0
  12. package/dist/de-ZAyw44MG.d.cts +10 -0
  13. package/dist/de-bIFBVR-K.d.ts +10 -0
  14. package/dist/ec-CCV5mLhv.d.ts +10 -0
  15. package/dist/ec-D7HUkRKn.d.cts +10 -0
  16. package/dist/es-C7dIuFpf.d.cts +10 -0
  17. package/dist/es-DVVnhfSE.d.ts +10 -0
  18. package/dist/fr-BSghMzs5.d.cts +10 -0
  19. package/dist/fr-C8OxubJ3.d.ts +10 -0
  20. package/dist/gb-B5NBNoma.d.cts +10 -0
  21. package/dist/gb-DDivDdMy.d.ts +10 -0
  22. package/dist/gt-DiiNa6Vm.d.ts +10 -0
  23. package/dist/gt-uZfIOMWw.d.cts +10 -0
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +16 -0
  27. package/dist/index.d.ts +16 -0
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/it-BtfZnlF6.d.cts +10 -0
  31. package/dist/it-DollYcFl.d.ts +10 -0
  32. package/dist/locales/ar.cjs +2 -0
  33. package/dist/locales/ar.cjs.map +1 -0
  34. package/dist/locales/ar.d.cts +2 -0
  35. package/dist/locales/ar.d.ts +2 -0
  36. package/dist/locales/ar.js +2 -0
  37. package/dist/locales/ar.js.map +1 -0
  38. package/dist/locales/br.cjs +2 -0
  39. package/dist/locales/br.cjs.map +1 -0
  40. package/dist/locales/br.d.cts +2 -0
  41. package/dist/locales/br.d.ts +2 -0
  42. package/dist/locales/br.js +2 -0
  43. package/dist/locales/br.js.map +1 -0
  44. package/dist/locales/ca.cjs +2 -0
  45. package/dist/locales/ca.cjs.map +1 -0
  46. package/dist/locales/ca.d.cts +2 -0
  47. package/dist/locales/ca.d.ts +2 -0
  48. package/dist/locales/ca.js +2 -0
  49. package/dist/locales/ca.js.map +1 -0
  50. package/dist/locales/cl.cjs +2 -0
  51. package/dist/locales/cl.cjs.map +1 -0
  52. package/dist/locales/cl.d.cts +2 -0
  53. package/dist/locales/cl.d.ts +2 -0
  54. package/dist/locales/cl.js +2 -0
  55. package/dist/locales/cl.js.map +1 -0
  56. package/dist/locales/cr.cjs +2 -0
  57. package/dist/locales/cr.cjs.map +1 -0
  58. package/dist/locales/cr.d.cts +2 -0
  59. package/dist/locales/cr.d.ts +2 -0
  60. package/dist/locales/cr.js +2 -0
  61. package/dist/locales/cr.js.map +1 -0
  62. package/dist/locales/de.cjs +2 -0
  63. package/dist/locales/de.cjs.map +1 -0
  64. package/dist/locales/de.d.cts +2 -0
  65. package/dist/locales/de.d.ts +2 -0
  66. package/dist/locales/de.js +2 -0
  67. package/dist/locales/de.js.map +1 -0
  68. package/dist/locales/ec.cjs +2 -0
  69. package/dist/locales/ec.cjs.map +1 -0
  70. package/dist/locales/ec.d.cts +2 -0
  71. package/dist/locales/ec.d.ts +2 -0
  72. package/dist/locales/ec.js +2 -0
  73. package/dist/locales/ec.js.map +1 -0
  74. package/dist/locales/es.cjs +2 -0
  75. package/dist/locales/es.cjs.map +1 -0
  76. package/dist/locales/es.d.cts +2 -0
  77. package/dist/locales/es.d.ts +2 -0
  78. package/dist/locales/es.js +2 -0
  79. package/dist/locales/es.js.map +1 -0
  80. package/dist/locales/fr.cjs +2 -0
  81. package/dist/locales/fr.cjs.map +1 -0
  82. package/dist/locales/fr.d.cts +2 -0
  83. package/dist/locales/fr.d.ts +2 -0
  84. package/dist/locales/fr.js +2 -0
  85. package/dist/locales/fr.js.map +1 -0
  86. package/dist/locales/gb.cjs +2 -0
  87. package/dist/locales/gb.cjs.map +1 -0
  88. package/dist/locales/gb.d.cts +2 -0
  89. package/dist/locales/gb.d.ts +2 -0
  90. package/dist/locales/gb.js +2 -0
  91. package/dist/locales/gb.js.map +1 -0
  92. package/dist/locales/gt.cjs +2 -0
  93. package/dist/locales/gt.cjs.map +1 -0
  94. package/dist/locales/gt.d.cts +2 -0
  95. package/dist/locales/gt.d.ts +2 -0
  96. package/dist/locales/gt.js +2 -0
  97. package/dist/locales/gt.js.map +1 -0
  98. package/dist/locales/it.cjs +2 -0
  99. package/dist/locales/it.cjs.map +1 -0
  100. package/dist/locales/it.d.cts +2 -0
  101. package/dist/locales/it.d.ts +2 -0
  102. package/dist/locales/it.js +2 -0
  103. package/dist/locales/it.js.map +1 -0
  104. package/dist/locales/pa.cjs +2 -0
  105. package/dist/locales/pa.cjs.map +1 -0
  106. package/dist/locales/pa.d.cts +2 -0
  107. package/dist/locales/pa.d.ts +2 -0
  108. package/dist/locales/pa.js +2 -0
  109. package/dist/locales/pa.js.map +1 -0
  110. package/dist/locales/pe.cjs +2 -0
  111. package/dist/locales/pe.cjs.map +1 -0
  112. package/dist/locales/pe.d.cts +2 -0
  113. package/dist/locales/pe.d.ts +2 -0
  114. package/dist/locales/pe.js +2 -0
  115. package/dist/locales/pe.js.map +1 -0
  116. package/dist/locales/us.cjs +2 -0
  117. package/dist/locales/us.cjs.map +1 -0
  118. package/dist/locales/us.d.cts +2 -0
  119. package/dist/locales/us.d.ts +2 -0
  120. package/dist/locales/us.js +2 -0
  121. package/dist/locales/us.js.map +1 -0
  122. package/dist/locales/ve.cjs +2 -0
  123. package/dist/locales/ve.cjs.map +1 -0
  124. package/dist/locales/ve.d.cts +2 -0
  125. package/dist/locales/ve.d.ts +2 -0
  126. package/dist/locales/ve.js +2 -0
  127. package/dist/locales/ve.js.map +1 -0
  128. package/dist/pa-CEAa_MLu.d.cts +10 -0
  129. package/dist/pa-CeerPsSh.d.ts +10 -0
  130. package/dist/pe-CHVFUsc1.d.cts +10 -0
  131. package/dist/pe-ZpTRwvEa.d.ts +10 -0
  132. package/dist/us-BV-jF4X9.d.cts +10 -0
  133. package/dist/us-DcxF3Jrz.d.ts +10 -0
  134. package/dist/ve-Czf_bYd9.d.ts +10 -0
  135. package/dist/ve-DMPrCtKR.d.cts +10 -0
  136. package/package.json +193 -10
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/gb.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,EAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,EAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,GAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,gCAAiC,CAAA,CAGnE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,GAC7BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"gb.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '44';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // UK numbers: 10 digits (excluding the leading 0)\n // But users often include the leading 0, so we accept both formats\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 7\n if (national.startsWith('7')) {\n type = 'mobile';\n }\n // Landline: Starts with 1, 2, 3\n else if (/^[123]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="502";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>8&&(t=i.slice(r.length)),t.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let o="unknown";/^[345]/.test(t)?o="mobile":/^[267]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=gt.cjs.map
2
+ //# sourceMappingURL=gt.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/gt.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,CAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,QAAA,CAAS,KAAKD,CAAQ,CAAA,CACxBC,CAAAA,CAAO,QAAA,CAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,GAC7BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"gt.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '502';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Guatemalan numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3, 4, 5\n if (/^[345]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 2, 6, 7\n else if (/^[267]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../gt-uZfIOMWw.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../gt-DiiNa6Vm.js';
@@ -0,0 +1,2 @@
1
+ function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="502";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>8&&(t=i.slice(r.length)),t.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let o="unknown";/^[345]/.test(t)?o="mobile":/^[267]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=gt.js.map
2
+ //# sourceMappingURL=gt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/gt.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,CAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,QAAA,CAAS,KAAKD,CAAQ,CAAA,CACxBC,CAAAA,CAAO,QAAA,CAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,GAC7BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"gt.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '502';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Guatemalan numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3, 4, 5\n if (/^[345]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 2, 6, 7\n else if (/^[267]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="39";function u(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>10)return {isValid:false,error:"Phone number must be 9-10 digits"};let o="unknown";t.startsWith("3")?o="mobile":o="landline";let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=u;//# sourceMappingURL=it.cjs.map
2
+ //# sourceMappingURL=it.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/it.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,EAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,EAAS,MAAA,CAAS,EAAA,CAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,kCAAmC,CAAA,CAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"it.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '39';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Italian numbers: variable length (9-10 digits)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 10) {\n return { isValid: false, error: 'Phone number must be 9-10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3\n if (national.startsWith('3')) {\n type = 'mobile';\n }\n // Landline: various area codes (0, 1, 2, 4, 5, 6, 7, 8, 9)\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../it-BtfZnlF6.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../it-DollYcFl.js';
@@ -0,0 +1,2 @@
1
+ function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="39";function u(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>10)return {isValid:false,error:"Phone number must be 9-10 digits"};let o="unknown";t.startsWith("3")?o="mobile":o="landline";let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{u as validate};//# sourceMappingURL=it.js.map
2
+ //# sourceMappingURL=it.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/it.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,EAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,EAAS,MAAA,CAAS,EAAA,CAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,kCAAmC,CAAA,CAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"it.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '39';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Italian numbers: variable length (9-10 digits)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 10) {\n return { isValid: false, error: 'Phone number must be 9-10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3\n if (national.startsWith('3')) {\n type = 'mobile';\n }\n // Landline: various area codes (0, 1, 2, 4, 5, 6, 7, 8, 9)\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="507";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>8&&(t=i.slice(r.length)),t.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let o="unknown";t.startsWith("6")?o="mobile":/^[2-57-9]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=pa.cjs.map
2
+ //# sourceMappingURL=pa.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pa.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,CAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,WAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,WAAA,CAAY,IAAA,CAAKD,CAAQ,CAAA,GAChCC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pa.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '507';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Panamanian numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6\n if (national.startsWith('6')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-5, 7-9\n else if (/^[2-57-9]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../pa-CEAa_MLu.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../pa-CeerPsSh.js';
@@ -0,0 +1,2 @@
1
+ function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="507";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>8&&(t=i.slice(r.length)),t.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let o="unknown";t.startsWith("6")?o="mobile":/^[2-57-9]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=pa.js.map
2
+ //# sourceMappingURL=pa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pa.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,CAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,WAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,WAAA,CAAY,IAAA,CAAKD,CAAQ,CAAA,GAChCC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pa.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '507';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Panamanian numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6\n if (national.startsWith('6')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-5, 7-9\n else if (/^[2-57-9]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="51";function m(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[01]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Peru"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=pe.cjs.map
2
+ //# sourceMappingURL=pe.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pe.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,yBAA0B,CAAA,CAG5D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pe.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '51';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Peruvian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 1 (Lima) or other area codes (0)\n else if (/^[01]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Peru' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../pe-CHVFUsc1.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../pe-ZpTRwvEa.js';
@@ -0,0 +1,2 @@
1
+ function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="51";function m(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[01]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Peru"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=pe.js.map
2
+ //# sourceMappingURL=pe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pe.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,yBAA0B,CAAA,CAG5D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pe.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '51';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Peruvian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 1 (Lima) or other area codes (0)\n else if (/^[01]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Peru' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="1";function u(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length===11&&(e=r.slice(i.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let l=e.substring(0,3);if(!/^[2-9][0-8][0-9]$/.test(l))return {isValid:false,error:"Invalid area code"};let f=e.substring(3,6);if(!/^[2-9]\d{2}$/.test(f))return {isValid:false,error:"Invalid exchange code"};let o=e;return n?.format==="e164"?o=s(i,e):n?.format==="international"&&(o=`+${i} ${e}`),{isValid:true,type:"unknown",formatted:o}}exports.validate=u;//# sourceMappingURL=us.cjs.map
2
+ //# sourceMappingURL=us.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/us.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","areaCode","exchangeCode","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,GAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,GAAW,EAAA,GACzDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,gCAAiC,CAAA,CAInE,IAAMC,CAAAA,CAAWD,CAAAA,CAAS,SAAA,CAAU,CAAA,CAAG,CAAC,CAAA,CACxC,GAAI,CAAC,mBAAA,CAAoB,IAAA,CAAKC,CAAQ,CAAA,CACpC,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,mBAAoB,CAAA,CAItD,IAAMC,CAAAA,CAAeF,CAAAA,CAAS,SAAA,CAAU,CAAA,CAAG,CAAC,CAAA,CAC5C,GAAI,CAAC,cAAA,CAAe,IAAA,CAAKE,CAAY,CAAA,CACnC,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,uBAAwB,CAAA,CAG1D,IAAIC,CAAAA,CAAYH,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBK,CAAAA,CAAYT,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BK,CAAAA,CAAY,CAAA,CAAA,EAAIP,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAM,SAAA,CAAW,SAAA,CAAAG,CAAU,CACrD","file":"us.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '1';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length === 11) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // US/Canada numbers: 10 digits (NPA-NXX-XXXX)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Check valid area code (NPA): first digit 2-9, second digit 0-8, third digit 0-9\n const areaCode = national.substring(0, 3);\n if (!/^[2-9][0-8][0-9]$/.test(areaCode)) {\n return { isValid: false, error: 'Invalid area code' };\n }\n\n // Check valid exchange code (NXX): first digit 2-9\n const exchangeCode = national.substring(3, 6);\n if (!/^[2-9]\\d{2}$/.test(exchangeCode)) {\n return { isValid: false, error: 'Invalid exchange code' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../us-BV-jF4X9.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../us-DcxF3Jrz.js';
@@ -0,0 +1,2 @@
1
+ function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="1";function u(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length===11&&(e=r.slice(i.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let l=e.substring(0,3);if(!/^[2-9][0-8][0-9]$/.test(l))return {isValid:false,error:"Invalid area code"};let f=e.substring(3,6);if(!/^[2-9]\d{2}$/.test(f))return {isValid:false,error:"Invalid exchange code"};let o=e;return n?.format==="e164"?o=s(i,e):n?.format==="international"&&(o=`+${i} ${e}`),{isValid:true,type:"unknown",formatted:o}}export{u as validate};//# sourceMappingURL=us.js.map
2
+ //# sourceMappingURL=us.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/us.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","areaCode","exchangeCode","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,GAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,GAAW,EAAA,GACzDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,gCAAiC,CAAA,CAInE,IAAMC,CAAAA,CAAWD,CAAAA,CAAS,SAAA,CAAU,CAAA,CAAG,CAAC,CAAA,CACxC,GAAI,CAAC,mBAAA,CAAoB,IAAA,CAAKC,CAAQ,CAAA,CACpC,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,mBAAoB,CAAA,CAItD,IAAMC,CAAAA,CAAeF,CAAAA,CAAS,SAAA,CAAU,CAAA,CAAG,CAAC,CAAA,CAC5C,GAAI,CAAC,cAAA,CAAe,IAAA,CAAKE,CAAY,CAAA,CACnC,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,uBAAwB,CAAA,CAG1D,IAAIC,CAAAA,CAAYH,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBK,CAAAA,CAAYT,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BK,CAAAA,CAAY,CAAA,CAAA,EAAIP,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAM,SAAA,CAAW,SAAA,CAAAG,CAAU,CACrD","file":"us.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '1';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length === 11) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // US/Canada numbers: 10 digits (NPA-NXX-XXXX)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Check valid area code (NPA): first digit 2-9, second digit 0-8, third digit 0-9\n const areaCode = national.substring(0, 3);\n if (!/^[2-9][0-8][0-9]$/.test(areaCode)) {\n return { isValid: false, error: 'Invalid area code' };\n }\n\n // Check valid exchange code (NXX): first digit 2-9\n const exchangeCode = national.substring(3, 6);\n if (!/^[2-9]\\d{2}$/.test(exchangeCode)) {\n return { isValid: false, error: 'Invalid exchange code' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="58";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>10&&(t=i.slice(r.length)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let o="unknown";t.startsWith("4")?o="mobile":/^[2]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=ve.cjs.map
2
+ //# sourceMappingURL=ve.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ve.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,EAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,gCAAiC,CAAA,CAGnE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,WAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,MAAA,CAAO,IAAA,CAAKD,CAAQ,CAAA,GAC3BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ve.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '58';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Venezuelan numbers: 10 digits (including area code)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 4\n if (national.startsWith('4')) {\n type = 'mobile';\n }\n // Landline: Starts with 2 (Caracas) or other area codes\n else if (/^[2]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { a as validate } from '../ve-DMPrCtKR.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { a as validate } from '../ve-Czf_bYd9.js';
@@ -0,0 +1,2 @@
1
+ function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="58";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>10&&(t=i.slice(r.length)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let o="unknown";t.startsWith("4")?o="mobile":/^[2]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=ve.js.map
2
+ //# sourceMappingURL=ve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ve.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,EAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,gCAAiC,CAAA,CAGnE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,WAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,MAAA,CAAO,IAAA,CAAKD,CAAQ,CAAA,GAC3BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ve.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '58';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Venezuelan numbers: 10 digits (including area code)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 4\n if (national.startsWith('4')) {\n type = 'mobile';\n }\n // Landline: Starts with 2 (Caracas) or other area codes\n else if (/^[2]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const pa_validate: typeof validate;
6
+ declare namespace pa {
7
+ export { pa_validate as validate };
8
+ }
9
+
10
+ export { pa as p, validate as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const pa_validate: typeof validate;
6
+ declare namespace pa {
7
+ export { pa_validate as validate };
8
+ }
9
+
10
+ export { pa as p, validate as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const pe_validate: typeof validate;
6
+ declare namespace pe {
7
+ export { pe_validate as validate };
8
+ }
9
+
10
+ export { pe as p, validate as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const pe_validate: typeof validate;
6
+ declare namespace pe {
7
+ export { pe_validate as validate };
8
+ }
9
+
10
+ export { pe as p, validate as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const us_validate: typeof validate;
6
+ declare namespace us {
7
+ export { us_validate as validate };
8
+ }
9
+
10
+ export { us as u, validate as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const us_validate: typeof validate;
6
+ declare namespace us {
7
+ export { us_validate as validate };
8
+ }
9
+
10
+ export { us as u, validate as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const ve_validate: typeof validate;
6
+ declare namespace ve {
7
+ export { ve_validate as validate };
8
+ }
9
+
10
+ export { validate as a, ve as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const ve_validate: typeof validate;
6
+ declare namespace ve {
7
+ export { ve_validate as validate };
8
+ }
9
+
10
+ export { validate as a, ve as v };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "soff-phone",
3
- "version": "0.0.1",
4
- "description": "Lightweight phone number validation and formatting library for LATAM",
3
+ "version": "0.0.3",
4
+ "description": "Lightweight phone number validation and formatting library for global markets",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -18,6 +18,46 @@
18
18
  "default": "./dist/index.cjs"
19
19
  }
20
20
  },
21
+ "./ar": {
22
+ "import": {
23
+ "types": "./dist/locales/ar.d.ts",
24
+ "default": "./dist/locales/ar.js"
25
+ },
26
+ "require": {
27
+ "types": "./dist/locales/ar.d.cts",
28
+ "default": "./dist/locales/ar.cjs"
29
+ }
30
+ },
31
+ "./br": {
32
+ "import": {
33
+ "types": "./dist/locales/br.d.ts",
34
+ "default": "./dist/locales/br.js"
35
+ },
36
+ "require": {
37
+ "types": "./dist/locales/br.d.cts",
38
+ "default": "./dist/locales/br.cjs"
39
+ }
40
+ },
41
+ "./ca": {
42
+ "import": {
43
+ "types": "./dist/locales/ca.d.ts",
44
+ "default": "./dist/locales/ca.js"
45
+ },
46
+ "require": {
47
+ "types": "./dist/locales/ca.d.cts",
48
+ "default": "./dist/locales/ca.cjs"
49
+ }
50
+ },
51
+ "./cl": {
52
+ "import": {
53
+ "types": "./dist/locales/cl.d.ts",
54
+ "default": "./dist/locales/cl.js"
55
+ },
56
+ "require": {
57
+ "types": "./dist/locales/cl.d.cts",
58
+ "default": "./dist/locales/cl.cjs"
59
+ }
60
+ },
21
61
  "./co": {
22
62
  "import": {
23
63
  "types": "./dist/locales/co.d.ts",
@@ -28,6 +68,86 @@
28
68
  "default": "./dist/locales/co.cjs"
29
69
  }
30
70
  },
71
+ "./cr": {
72
+ "import": {
73
+ "types": "./dist/locales/cr.d.ts",
74
+ "default": "./dist/locales/cr.js"
75
+ },
76
+ "require": {
77
+ "types": "./dist/locales/cr.d.cts",
78
+ "default": "./dist/locales/cr.cjs"
79
+ }
80
+ },
81
+ "./de": {
82
+ "import": {
83
+ "types": "./dist/locales/de.d.ts",
84
+ "default": "./dist/locales/de.js"
85
+ },
86
+ "require": {
87
+ "types": "./dist/locales/de.d.cts",
88
+ "default": "./dist/locales/de.cjs"
89
+ }
90
+ },
91
+ "./ec": {
92
+ "import": {
93
+ "types": "./dist/locales/ec.d.ts",
94
+ "default": "./dist/locales/ec.js"
95
+ },
96
+ "require": {
97
+ "types": "./dist/locales/ec.d.cts",
98
+ "default": "./dist/locales/ec.cjs"
99
+ }
100
+ },
101
+ "./es": {
102
+ "import": {
103
+ "types": "./dist/locales/es.d.ts",
104
+ "default": "./dist/locales/es.js"
105
+ },
106
+ "require": {
107
+ "types": "./dist/locales/es.d.cts",
108
+ "default": "./dist/locales/es.cjs"
109
+ }
110
+ },
111
+ "./fr": {
112
+ "import": {
113
+ "types": "./dist/locales/fr.d.ts",
114
+ "default": "./dist/locales/fr.js"
115
+ },
116
+ "require": {
117
+ "types": "./dist/locales/fr.d.cts",
118
+ "default": "./dist/locales/fr.cjs"
119
+ }
120
+ },
121
+ "./gb": {
122
+ "import": {
123
+ "types": "./dist/locales/gb.d.ts",
124
+ "default": "./dist/locales/gb.js"
125
+ },
126
+ "require": {
127
+ "types": "./dist/locales/gb.d.cts",
128
+ "default": "./dist/locales/gb.cjs"
129
+ }
130
+ },
131
+ "./gt": {
132
+ "import": {
133
+ "types": "./dist/locales/gt.d.ts",
134
+ "default": "./dist/locales/gt.js"
135
+ },
136
+ "require": {
137
+ "types": "./dist/locales/gt.d.cts",
138
+ "default": "./dist/locales/gt.cjs"
139
+ }
140
+ },
141
+ "./it": {
142
+ "import": {
143
+ "types": "./dist/locales/it.d.ts",
144
+ "default": "./dist/locales/it.js"
145
+ },
146
+ "require": {
147
+ "types": "./dist/locales/it.d.cts",
148
+ "default": "./dist/locales/it.cjs"
149
+ }
150
+ },
31
151
  "./mx": {
32
152
  "import": {
33
153
  "types": "./dist/locales/mx.d.ts",
@@ -37,6 +157,46 @@
37
157
  "types": "./dist/locales/mx.d.cts",
38
158
  "default": "./dist/locales/mx.cjs"
39
159
  }
160
+ },
161
+ "./pa": {
162
+ "import": {
163
+ "types": "./dist/locales/pa.d.ts",
164
+ "default": "./dist/locales/pa.js"
165
+ },
166
+ "require": {
167
+ "types": "./dist/locales/pa.d.cts",
168
+ "default": "./dist/locales/pa.cjs"
169
+ }
170
+ },
171
+ "./pe": {
172
+ "import": {
173
+ "types": "./dist/locales/pe.d.ts",
174
+ "default": "./dist/locales/pe.js"
175
+ },
176
+ "require": {
177
+ "types": "./dist/locales/pe.d.cts",
178
+ "default": "./dist/locales/pe.cjs"
179
+ }
180
+ },
181
+ "./us": {
182
+ "import": {
183
+ "types": "./dist/locales/us.d.ts",
184
+ "default": "./dist/locales/us.js"
185
+ },
186
+ "require": {
187
+ "types": "./dist/locales/us.d.cts",
188
+ "default": "./dist/locales/us.cjs"
189
+ }
190
+ },
191
+ "./ve": {
192
+ "import": {
193
+ "types": "./dist/locales/ve.d.ts",
194
+ "default": "./dist/locales/ve.js"
195
+ },
196
+ "require": {
197
+ "types": "./dist/locales/ve.d.cts",
198
+ "default": "./dist/locales/ve.cjs"
199
+ }
40
200
  }
41
201
  },
42
202
  "files": [
@@ -47,7 +207,7 @@
47
207
  "dev": "tsup --watch",
48
208
  "test": "vitest run",
49
209
  "test:watch": "vitest",
50
- "test:coverage": "vitest --coverage",
210
+ "test:coverage": "vitest run --coverage",
51
211
  "type-check": "tsc --noEmit",
52
212
  "lint": "eslint .",
53
213
  "lint:fix": "eslint . --fix",
@@ -67,9 +227,28 @@
67
227
  "phone",
68
228
  "validation",
69
229
  "formatting",
230
+ "international",
231
+ "argentina",
232
+ "brazil",
233
+ "canada",
234
+ "chile",
70
235
  "colombia",
236
+ "costa-rica",
237
+ "ecuador",
238
+ "france",
239
+ "germany",
240
+ "guatemala",
241
+ "italy",
71
242
  "mexico",
243
+ "panama",
244
+ "peru",
245
+ "spain",
246
+ "united-kingdom",
247
+ "united-states",
248
+ "venezuela",
72
249
  "latam",
250
+ "europe",
251
+ "north-america",
73
252
  "typescript",
74
253
  "tree-shaking",
75
254
  "lightweight"
@@ -89,17 +268,21 @@
89
268
  "node": ">=20"
90
269
  },
91
270
  "devDependencies": {
92
- "@eslint/js": "^9.39.1",
271
+ "@eslint/js": "^9.39.2",
93
272
  "@soff/tsconfig": "*",
94
- "@vitest/coverage-v8": "^4.0.14",
95
- "eslint": "^9.39.1",
273
+ "@vitest/coverage-v8": "^4.0.15",
274
+ "eslint": "^9.39.2",
96
275
  "eslint-config-prettier": "^10.1.8",
97
276
  "globals": "^16.5.0",
98
- "prettier": "^3.7.3",
99
- "rimraf": "^6.0.1",
277
+ "prettier": "^3.7.4",
278
+ "rimraf": "^6.1.2",
100
279
  "tsup": "^8.5.1",
101
280
  "typescript": "^5.9.3",
102
- "typescript-eslint": "^8.48.0",
103
- "vitest": "^4.0.14"
281
+ "typescript-eslint": "^8.49.0",
282
+ "vitest": "^4.0.15"
283
+ },
284
+ "publishConfig": {
285
+ "access": "public",
286
+ "provenance": true
104
287
  }
105
288
  }