@ancon/wildcat-utils 1.16.0 → 1.16.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancon/wildcat-utils",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -161,6 +161,11 @@
161
161
  "require": "./string/truncate.js",
162
162
  "types": "./string/truncate.d.ts"
163
163
  },
164
+ "./user/getFormattedPhoneNumber": {
165
+ "import": "./user/getFormattedPhoneNumber.mjs",
166
+ "require": "./user/getFormattedPhoneNumber.js",
167
+ "types": "./user/getFormattedPhoneNumber.d.ts"
168
+ },
164
169
  "./user/getFullAddressString": {
165
170
  "import": "./user/getFullAddressString.mjs",
166
171
  "require": "./user/getFullAddressString.js",
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Format phone number - use inside try catch block
3
+ *
4
+ * @param phoneNumber - Phone number
5
+ * @returns Formatted phone number
6
+ */
7
+ declare function getFormattedPhoneNumber(phoneNumber: string): string;
8
+ export default getFormattedPhoneNumber;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("google-libphonenumber"),e=t.PhoneNumberUtil.getInstance();function n(o){const r=e.parse(o);return e.format(r,t.PhoneNumberFormat.INTERNATIONAL)}module.exports=n;
@@ -0,0 +1,12 @@
1
+ import { PhoneNumberUtil as r, PhoneNumberFormat as n } from "google-libphonenumber";
2
+ const t = r.getInstance();
3
+ function u(e) {
4
+ const o = t.parse(e);
5
+ return t.format(
6
+ o,
7
+ n.INTERNATIONAL
8
+ );
9
+ }
10
+ export {
11
+ u as default
12
+ };