@voxie/contacts.js 1.2.5 → 1.2.6

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 (2) hide show
  1. package/dist/contacts.js +10 -0
  2. package/package.json +6 -3
package/dist/contacts.js CHANGED
@@ -787,6 +787,10 @@ function Ze(t, n) {
787
787
  switch (j(t, n)) {
788
788
  case "IS_POSSIBLE":
789
789
  return !0;
790
+ // This library ignores "local-only" phone numbers (for simplicity).
791
+ // See the readme for more info on what are "local-only" phone numbers.
792
+ // case 'IS_POSSIBLE_LOCAL_ONLY':
793
+ // return !isInternational
790
794
  default:
791
795
  return !1;
792
796
  }
@@ -974,6 +978,10 @@ function sn(t, n, e, r) {
974
978
  number: "+".concat(d).concat(i),
975
979
  ext: t.ext
976
980
  });
981
+ // For reference, here's Google's IDD formatter:
982
+ // https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546
983
+ // Not saying that this IDD formatter replicates it 1:1, but it seems to work.
984
+ // Who would even need to format phone numbers in IDD format anyway?
977
985
  case "IDD":
978
986
  if (!e.fromCountry)
979
987
  return;
@@ -1920,6 +1928,7 @@ var yr = /* @__PURE__ */ function() {
1920
1928
  args: pr(i)
1921
1929
  });
1922
1930
  break;
1931
+ /* istanbul ignore next */
1923
1932
  default:
1924
1933
  throw new Error("Unknown operator: ".concat(d));
1925
1934
  }
@@ -2091,6 +2100,7 @@ function ee(t, n, e) {
2091
2100
  };
2092
2101
  }
2093
2102
  return;
2103
+ /* istanbul ignore next */
2094
2104
  default:
2095
2105
  throw new Error("Unsupported instruction tree: ".concat(n));
2096
2106
  }
package/package.json CHANGED
@@ -44,19 +44,22 @@
44
44
  "happy-dom": "^12.10.3",
45
45
  "jest": "^29.7.0",
46
46
  "jest-environment-jsdom": "^29.7.0",
47
- "libphonenumber-js": "^1.11.19",
47
+ "libphonenumber-js": "^1.11.20",
48
48
  "tailwindcss": "^3.4.17",
49
49
  "ts-jest": "^29.2.5",
50
50
  "ts-node": "^10.9.2",
51
51
  "typescript": "~5.6.3",
52
52
  "unfetch": "^4.2.0",
53
- "vite": "^5.4.14",
53
+ "vite": "^6.1.0",
54
54
  "vite-plugin-dts": "^4.5.0",
55
55
  "vitest": "^2.1.9"
56
56
  },
57
+ "overrides": {
58
+ "esbuild": "0.25.0"
59
+ },
57
60
  "engines": {
58
61
  "node": "^18.20.6 || ^20.18.2",
59
62
  "npm": "^10.9.2"
60
63
  },
61
- "version": "1.2.5"
64
+ "version": "1.2.6"
62
65
  }