@nr1e/commons 0.4.4 → 0.4.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.
@@ -5,5 +5,5 @@
5
5
  *
6
6
  * @param cardNumber - The card number to mask
7
7
  */
8
- export declare function maskCardNumber(cardNumber: string): string;
8
+ export declare function maskCardNumber(cardNumber?: string | null): string | null;
9
9
  //# sourceMappingURL=card.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.mts","sourceRoot":"","sources":["../../src/business/card.mts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,UAehD"}
1
+ {"version":3,"file":"card.d.mts","sourceRoot":"","sources":["../../src/business/card.mts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,iBAsBxD"}
@@ -6,6 +6,11 @@
6
6
  * @param cardNumber - The card number to mask
7
7
  */
8
8
  export function maskCardNumber(cardNumber) {
9
+ if (cardNumber === undefined ||
10
+ cardNumber === null ||
11
+ cardNumber.trim().length === 0) {
12
+ return null;
13
+ }
9
14
  cardNumber = cardNumber.trim().replace(/\s+/g, '');
10
15
  // If the card length is less than 8, we mask everything to be safe
11
16
  if (cardNumber.length < 8) {
@@ -1 +1 @@
1
- {"version":3,"file":"card.mjs","sourceRoot":"","sources":["../../src/business/card.mts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,UAAU,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACnD,mEAAmE;IACnE,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IACD,g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AAC,MAAM,GAAG,EAAE,EAAE,GAAG,CAAC;QACtC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACrB,CAAC;AACJ,CAAC"}
@@ -13,5 +13,11 @@ test('Test maskCardNumber', () => {
13
13
  expect(masked).toEqual('****5678');
14
14
  masked = maskCardNumber('1234567890');
15
15
  expect(masked).toEqual('******7890');
16
+ masked = maskCardNumber('');
17
+ expect(masked).toBeNull();
18
+ masked = maskCardNumber(null);
19
+ expect(masked).toBeNull();
20
+ masked = maskCardNumber(undefined);
21
+ expect(masked).toBeNull();
16
22
  });
17
23
  //# sourceMappingURL=card.test.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.test.mjs","sourceRoot":"","sources":["../../src/business/card.test.mts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE1C,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAC/B,IAAI,MAAM,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC3C,MAAM,GAAG,cAAc,CAAC,qBAAqB,CAAC,CAAC;IAC/C,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC3C,MAAM,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAC7C,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC1C,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACnC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,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AC,CAAC;IAC9B,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1B,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACnC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC5B,CAAC,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './card.mjs';
2
+ export * from './phone-number.mjs';
2
3
  export * from './us-state-to-code.mjs';
3
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/business/index.mts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/business/index.mts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './card.mjs';
2
+ export * from './phone-number.mjs';
2
3
  export * from './us-state-to-code.mjs';
3
4
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/business/index.mts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/business/index.mts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import * as v from 'valibot';
2
+ import { parsePhoneNumberFromString, CountryCode } from 'libphonenumber-js';
3
+ export { parsePhoneNumberFromString, CountryCode };
4
+ /**
5
+ * Checks if a phone number is valid according to E.164 format.
6
+ *
7
+ * @param phoneNumber - The phone number to check.
8
+ */
9
+ export declare function isValidE164(phoneNumber: string): boolean;
10
+ /**
11
+ * Checks if a phone number is valid according to the specified country code.
12
+ *
13
+ * @param phoneNumber - The phone number to check.
14
+ * @param countryCode - The 2-letter country code (ISO 3166-1 alpha-2).
15
+ */
16
+ export declare function isValidPhoneNumber(phoneNumber: string, countryCode: CountryCode): boolean;
17
+ /**
18
+ * Converts a phone number to E.164 format.
19
+ *
20
+ * @param phoneNumber
21
+ * @param defaultCountry
22
+ */
23
+ export declare function toE164(phoneNumber: string, defaultCountry?: CountryCode): string | null;
24
+ /**
25
+ * Generates a valibot schema to validate a phone number given a country code.
26
+ *
27
+ * @param countryCode - The 2-letter country code (ISO 3166-1 alpha-2).
28
+ * @param msg - The error message to use if the phone number is invalid.
29
+ */
30
+ export declare function phoneNumberSchema(countryCode: CountryCode, msg?: string): v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
31
+ /**
32
+ * Generates a valibot schema to validate a phone number in E.164 format.
33
+ *
34
+ * @param msg - The error message to use if the phone number is invalid.
35
+ */
36
+ export declare function phoneNumberE164Schema(msg?: string): v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
37
+ /**
38
+ * Generates a valibot schema to validate a phone number and transform it into E.164 format
39
+ *
40
+ * @param countryCode - The 2-letter country code (ISO 3166-1 alpha-2).
41
+ * @param msg - The error message to use if the phone number is invalid.
42
+ */
43
+ export declare function phoneNumberToE164Schema(countryCode?: CountryCode, msg?: string): v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.TransformAction<string, string | null>, v.CheckAction<string | null, string>]>;
44
+ //# sourceMappingURL=phone-number.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-number.d.mts","sourceRoot":"","sources":["../../src/business/phone-number.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAC,0BAA0B,EAAE,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAC,0BAA0B,EAAE,WAAW,EAAC,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAOxD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,WAAW,WAMzB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CACpB,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,WAAW,GAC3B,MAAM,GAAG,IAAI,CAQf;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,MAAM,yFAUvE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,CAAC,EAAE,MAAM,yFASjD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,CAAC,EAAE,WAAW,EACzB,GAAG,CAAC,EAAE,MAAM,wJAab"}
@@ -0,0 +1,85 @@
1
+ import * as v from 'valibot';
2
+ import { parsePhoneNumberFromString } from 'libphonenumber-js';
3
+ export { parsePhoneNumberFromString };
4
+ /**
5
+ * Checks if a phone number is valid according to E.164 format.
6
+ *
7
+ * @param phoneNumber - The phone number to check.
8
+ */
9
+ export function isValidE164(phoneNumber) {
10
+ // Basic E.164 format check
11
+ if (!/^\+[1-9]\d{1,14}$/.test(phoneNumber)) {
12
+ return false;
13
+ }
14
+ const parsed = parsePhoneNumberFromString(phoneNumber);
15
+ return parsed?.isValid() ?? false;
16
+ }
17
+ /**
18
+ * Checks if a phone number is valid according to the specified country code.
19
+ *
20
+ * @param phoneNumber - The phone number to check.
21
+ * @param countryCode - The 2-letter country code (ISO 3166-1 alpha-2).
22
+ */
23
+ export function isValidPhoneNumber(phoneNumber, countryCode) {
24
+ const parsed = parsePhoneNumberFromString(phoneNumber, {
25
+ defaultCountry: countryCode,
26
+ });
27
+ return parsed?.isValid() ?? false;
28
+ }
29
+ /**
30
+ * Converts a phone number to E.164 format.
31
+ *
32
+ * @param phoneNumber
33
+ * @param defaultCountry
34
+ */
35
+ export function toE164(phoneNumber, defaultCountry) {
36
+ const phone = parsePhoneNumberFromString(phoneNumber, defaultCountry);
37
+ if (!phone || !phone.isValid()) {
38
+ return null;
39
+ }
40
+ return phone.number; // already E.164
41
+ }
42
+ /**
43
+ * Generates a valibot schema to validate a phone number given a country code.
44
+ *
45
+ * @param countryCode - The 2-letter country code (ISO 3166-1 alpha-2).
46
+ * @param msg - The error message to use if the phone number is invalid.
47
+ */
48
+ export function phoneNumberSchema(countryCode, msg) {
49
+ return v.pipe(v.string(), v.check((phoneNumber) => {
50
+ const parsed = parsePhoneNumberFromString(phoneNumber, {
51
+ defaultCountry: countryCode,
52
+ });
53
+ return parsed?.isValid() ?? false;
54
+ }, msg ?? 'Invalid phone number'));
55
+ }
56
+ /**
57
+ * Generates a valibot schema to validate a phone number in E.164 format.
58
+ *
59
+ * @param msg - The error message to use if the phone number is invalid.
60
+ */
61
+ export function phoneNumberE164Schema(msg) {
62
+ return v.pipe(v.string(), v.check((phoneNumber) => {
63
+ if (!isValidE164(phoneNumber))
64
+ return false;
65
+ const parsed = parsePhoneNumberFromString(phoneNumber);
66
+ return parsed?.isValid() ?? false;
67
+ }, msg ?? 'Invalid phone number'));
68
+ }
69
+ /**
70
+ * Generates a valibot schema to validate a phone number and transform it into E.164 format
71
+ *
72
+ * @param countryCode - The 2-letter country code (ISO 3166-1 alpha-2).
73
+ * @param msg - The error message to use if the phone number is invalid.
74
+ */
75
+ export function phoneNumberToE164Schema(countryCode, msg) {
76
+ return v.pipe(v.string(), v.trim(), v.transform((input) => toE164(input, countryCode)), v.check((phoneNumber) => {
77
+ if (!phoneNumber)
78
+ return false;
79
+ if (!isValidE164(phoneNumber))
80
+ return false;
81
+ const parsed = parsePhoneNumberFromString(phoneNumber);
82
+ return parsed?.isValid() ?? false;
83
+ }, msg ?? 'Invalid phone number'));
84
+ }
85
+ //# sourceMappingURL=phone-number.mjs.map
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"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nr1e/commons",
3
3
  "description": "Common utilities for TypeScript projects",
4
- "version": "0.4.4",
4
+ "version": "0.4.6",
5
5
  "type": "module",
6
6
  "author": "NR1E, Inc.",
7
7
  "publishConfig": {
@@ -19,9 +19,11 @@
19
19
  "@eslint/js": "^9.39.3",
20
20
  "@types/node": "^24.10.13",
21
21
  "eslint": "9.39.3",
22
+ "libphonenumber-js": "^1.12.26",
22
23
  "prettier": "3.8.1",
23
24
  "typescript": "5.9.3",
24
25
  "typescript-eslint": "8.56.1",
26
+ "valibot": "^1.2.0",
25
27
  "vitest": "4.0.18"
26
28
  },
27
29
  "dependencies": {