pakdatakit 2.2.1 → 2.3.0

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 (103) hide show
  1. package/DATA.md +302 -33
  2. package/README.md +172 -27
  3. package/dist/address.cjs +5 -5
  4. package/dist/address.js +3 -3
  5. package/dist/{chunk-4VSGCQ6K.cjs → chunk-2OBKPYJZ.cjs} +3 -3
  6. package/dist/chunk-33QMFE2Z.js +21244 -0
  7. package/dist/chunk-7E7L3NYS.cjs +11 -0
  8. package/dist/{chunk-TTARJWGT.js → chunk-A3HBEBXY.js} +2 -2
  9. package/dist/{chunk-3ZA265SK.cjs → chunk-AUQFA7EE.cjs} +172 -4
  10. package/dist/{chunk-HBOZIITD.js → chunk-CADQM4ZN.js} +14 -14
  11. package/dist/{chunk-3IARSCO6.cjs → chunk-DHOP7LQX.cjs} +25 -14
  12. package/dist/chunk-E6HSKRAE.js +9 -0
  13. package/dist/{chunk-33FXHM2E.cjs → chunk-ESKXG7Y6.cjs} +5 -5
  14. package/dist/{chunk-U7MWHXMF.cjs → chunk-FRBPAGEJ.cjs} +4 -4
  15. package/dist/chunk-I7UUPD3G.cjs +21252 -0
  16. package/dist/{chunk-YPPKY5XZ.js → chunk-IBZPJS4H.js} +26 -15
  17. package/dist/{chunk-47P7HILD.cjs → chunk-J5ARB4TE.cjs} +8 -8
  18. package/dist/{chunk-XCXFGTHW.cjs → chunk-J5ZF46NZ.cjs} +14 -14
  19. package/dist/{chunk-NZQ47NWD.js → chunk-KRYHLYN2.js} +1 -1
  20. package/dist/{chunk-RXNYY5K5.js → chunk-LQHM3ADX.js} +172 -4
  21. package/dist/{chunk-HTERSQGF.cjs → chunk-MTS6SVNP.cjs} +4 -4
  22. package/dist/chunk-N4S22XX3.js +6208 -0
  23. package/dist/chunk-OKMBYX3F.cjs +6220 -0
  24. package/dist/{chunk-6IPPANNX.js → chunk-P7LVE2TF.js} +2 -2
  25. package/dist/chunk-RZQJAZKC.js +22 -0
  26. package/dist/{chunk-PLDVGOKZ.js → chunk-S274QFFB.js} +2 -2
  27. package/dist/chunk-SQIHFEXI.cjs +25 -0
  28. package/dist/chunk-TBTWZC74.cjs +32 -0
  29. package/dist/{chunk-NAJGGUAM.cjs → chunk-TC3VRWZV.cjs} +2 -2
  30. package/dist/{chunk-QKH7W2CC.js → chunk-TQP2T33V.js} +5 -5
  31. package/dist/{chunk-AZV45DMG.js → chunk-V2XE3NCG.js} +2 -2
  32. package/dist/{chunk-NTD4JLDW.cjs → chunk-YTLE5K7G.cjs} +1 -1
  33. package/dist/{chunk-HUQY2WR5.js → chunk-YTSMFGTW.js} +13 -3
  34. package/dist/{chunk-EMH4IP2U.js → chunk-ZRONAQBV.js} +1 -1
  35. package/dist/class-validator.cjs +57 -0
  36. package/dist/class-validator.d.cts +57 -0
  37. package/dist/class-validator.d.ts +57 -0
  38. package/dist/class-validator.js +47 -0
  39. package/dist/cli.js +1 -1
  40. package/dist/geo.cjs +22 -6
  41. package/dist/geo.d.cts +56 -1
  42. package/dist/geo.d.ts +56 -1
  43. package/dist/geo.js +1 -1
  44. package/dist/holidays.cjs +4 -4
  45. package/dist/holidays.js +1 -1
  46. package/dist/iban.cjs +5 -5
  47. package/dist/iban.d.cts +8 -6
  48. package/dist/iban.d.ts +8 -6
  49. package/dist/iban.js +1 -1
  50. package/dist/index.cjs +106 -68
  51. package/dist/index.d.cts +5 -3
  52. package/dist/index.d.ts +5 -3
  53. package/dist/index.js +16 -14
  54. package/dist/input.cjs +9 -9
  55. package/dist/input.js +3 -3
  56. package/dist/joi.cjs +37 -0
  57. package/dist/joi.d.cts +24 -0
  58. package/dist/joi.d.ts +24 -0
  59. package/dist/joi.js +31 -0
  60. package/dist/networks.cjs +3 -3
  61. package/dist/networks.js +2 -2
  62. package/dist/numbers.cjs +6 -6
  63. package/dist/numbers.js +2 -2
  64. package/dist/passport.cjs +11 -0
  65. package/dist/passport.d.cts +27 -0
  66. package/dist/passport.d.ts +27 -0
  67. package/dist/passport.js +2 -0
  68. package/dist/phone.cjs +8 -8
  69. package/dist/phone.js +3 -3
  70. package/dist/postal.cjs +14 -6
  71. package/dist/postal.d.cts +54 -2
  72. package/dist/postal.d.ts +54 -2
  73. package/dist/postal.js +1 -1
  74. package/dist/raast.cjs +6 -6
  75. package/dist/raast.js +2 -2
  76. package/dist/superstruct.cjs +35 -0
  77. package/dist/superstruct.d.cts +24 -0
  78. package/dist/superstruct.d.ts +24 -0
  79. package/dist/superstruct.js +33 -0
  80. package/dist/valibot.cjs +12 -8
  81. package/dist/valibot.d.cts +2 -0
  82. package/dist/valibot.d.ts +2 -0
  83. package/dist/valibot.js +11 -7
  84. package/dist/vehicle.cjs +15 -0
  85. package/dist/vehicle.d.cts +43 -0
  86. package/dist/vehicle.d.ts +43 -0
  87. package/dist/vehicle.js +2 -0
  88. package/dist/whatsapp.cjs +3 -3
  89. package/dist/whatsapp.js +2 -2
  90. package/dist/yup.cjs +12 -8
  91. package/dist/yup.d.cts +2 -0
  92. package/dist/yup.d.ts +2 -0
  93. package/dist/yup.js +11 -7
  94. package/dist/zod.cjs +12 -8
  95. package/dist/zod.d.cts +2 -0
  96. package/dist/zod.d.ts +2 -0
  97. package/dist/zod.js +11 -7
  98. package/package.json +101 -3
  99. package/dist/chunk-34CJGJ67.cjs +0 -1697
  100. package/dist/chunk-4VVFS6FN.cjs +0 -715
  101. package/dist/chunk-E6DT2DWQ.js +0 -1689
  102. package/dist/chunk-GJENL6VK.cjs +0 -22
  103. package/dist/chunk-LIYNKIKS.js +0 -709
package/dist/valibot.js CHANGED
@@ -1,11 +1,13 @@
1
- import { RULES } from './chunk-HUQY2WR5.js';
2
- import './chunk-RXNYY5K5.js';
3
- import './chunk-PLDVGOKZ.js';
4
- import './chunk-AZV45DMG.js';
5
- import './chunk-6IPPANNX.js';
1
+ import { RULES } from './chunk-YTSMFGTW.js';
2
+ import './chunk-RZQJAZKC.js';
3
+ import './chunk-LQHM3ADX.js';
4
+ import './chunk-E6HSKRAE.js';
5
+ import './chunk-S274QFFB.js';
6
+ import './chunk-V2XE3NCG.js';
7
+ import './chunk-P7LVE2TF.js';
6
8
  import './chunk-CEPNSHIC.js';
7
9
  import './chunk-EEVNLTB4.js';
8
- import './chunk-YPPKY5XZ.js';
10
+ import './chunk-IBZPJS4H.js';
9
11
  import './chunk-ENQ7O7VW.js';
10
12
  import * as v from 'valibot';
11
13
 
@@ -19,7 +21,9 @@ var pk = {
19
21
  iban: schema("iban"),
20
22
  ntn: schema("ntn"),
21
23
  strn: schema("strn"),
22
- landline: schema("landline")
24
+ landline: schema("landline"),
25
+ passport: schema("passport"),
26
+ vehiclePlate: schema("vehiclePlate")
23
27
  };
24
28
 
25
29
  export { pk };
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var chunkSQIHFEXI_cjs = require('./chunk-SQIHFEXI.cjs');
4
+ require('./chunk-VPBMIYO2.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "parseVehiclePlate", {
9
+ enumerable: true,
10
+ get: function () { return chunkSQIHFEXI_cjs.parseVehiclePlate; }
11
+ });
12
+ Object.defineProperty(exports, "validateVehiclePlate", {
13
+ enumerable: true,
14
+ get: function () { return chunkSQIHFEXI_cjs.validateVehiclePlate; }
15
+ });
@@ -0,0 +1,43 @@
1
+ /** Result of {@link parseVehiclePlate}. */
2
+ interface VehiclePlate {
3
+ /** Letters before the number, e.g. `LEA`. */
4
+ series: string;
5
+ /** Digits of the registration number, e.g. `1234`. */
6
+ number: string;
7
+ /** Two-digit year printed on some older Punjab plates, e.g. `19`; otherwise `null`. */
8
+ year: string | null;
9
+ /** Series and number joined with a dash, e.g. `LEA-1234` (without the year). */
10
+ formatted: string;
11
+ }
12
+ /**
13
+ * Splits a Pakistani vehicle registration number into its series letters,
14
+ * number and optional year, e.g. `LEA-1234` or `ABC 123`.
15
+ *
16
+ * There is no single national format: each province's excise department sets
17
+ * its own, and several changed in 2024–2026 (numbers that stay with the
18
+ * owner, new series). This accepts the common shape shared by all of them:
19
+ * 1–4 letters, then 1–4 digits, optionally followed by the two-digit year
20
+ * that older Punjab plates carry (`LEA-1234-19`). Series letters are not
21
+ * checked against a list of districts, as no official list is published.
22
+ * Pass the registration number only, without labels such as "ICT" or
23
+ * "PUNJAB" printed elsewhere on the plate. Sources: see DATA.md.
24
+ *
25
+ * @example
26
+ * parseVehiclePlate('lea 1234');
27
+ * // { series: 'LEA', number: '1234', year: null, formatted: 'LEA-1234' }
28
+ *
29
+ * @param plate - Registration number as written on the plate
30
+ * @returns The parts, or `null` if it does not have the common shape
31
+ */
32
+ declare function parseVehiclePlate(plate: string): VehiclePlate | null;
33
+ /**
34
+ * Validates the format of a Pakistani vehicle registration number. Checks the
35
+ * common shape only; see {@link parseVehiclePlate}.
36
+ *
37
+ * @param plate - Registration number to validate
38
+ * @returns `true` if the format is valid
39
+ */
40
+ declare function validateVehiclePlate(plate: string): boolean;
41
+
42
+ export { parseVehiclePlate, validateVehiclePlate };
43
+ export type { VehiclePlate };
@@ -0,0 +1,43 @@
1
+ /** Result of {@link parseVehiclePlate}. */
2
+ interface VehiclePlate {
3
+ /** Letters before the number, e.g. `LEA`. */
4
+ series: string;
5
+ /** Digits of the registration number, e.g. `1234`. */
6
+ number: string;
7
+ /** Two-digit year printed on some older Punjab plates, e.g. `19`; otherwise `null`. */
8
+ year: string | null;
9
+ /** Series and number joined with a dash, e.g. `LEA-1234` (without the year). */
10
+ formatted: string;
11
+ }
12
+ /**
13
+ * Splits a Pakistani vehicle registration number into its series letters,
14
+ * number and optional year, e.g. `LEA-1234` or `ABC 123`.
15
+ *
16
+ * There is no single national format: each province's excise department sets
17
+ * its own, and several changed in 2024–2026 (numbers that stay with the
18
+ * owner, new series). This accepts the common shape shared by all of them:
19
+ * 1–4 letters, then 1–4 digits, optionally followed by the two-digit year
20
+ * that older Punjab plates carry (`LEA-1234-19`). Series letters are not
21
+ * checked against a list of districts, as no official list is published.
22
+ * Pass the registration number only, without labels such as "ICT" or
23
+ * "PUNJAB" printed elsewhere on the plate. Sources: see DATA.md.
24
+ *
25
+ * @example
26
+ * parseVehiclePlate('lea 1234');
27
+ * // { series: 'LEA', number: '1234', year: null, formatted: 'LEA-1234' }
28
+ *
29
+ * @param plate - Registration number as written on the plate
30
+ * @returns The parts, or `null` if it does not have the common shape
31
+ */
32
+ declare function parseVehiclePlate(plate: string): VehiclePlate | null;
33
+ /**
34
+ * Validates the format of a Pakistani vehicle registration number. Checks the
35
+ * common shape only; see {@link parseVehiclePlate}.
36
+ *
37
+ * @param plate - Registration number to validate
38
+ * @returns `true` if the format is valid
39
+ */
40
+ declare function validateVehiclePlate(plate: string): boolean;
41
+
42
+ export { parseVehiclePlate, validateVehiclePlate };
43
+ export type { VehiclePlate };
@@ -0,0 +1,2 @@
1
+ export { parseVehiclePlate, validateVehiclePlate } from './chunk-RZQJAZKC.js';
2
+ import './chunk-ENQ7O7VW.js';
package/dist/whatsapp.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkNAJGGUAM_cjs = require('./chunk-NAJGGUAM.cjs');
4
- require('./chunk-NTD4JLDW.cjs');
3
+ var chunkTC3VRWZV_cjs = require('./chunk-TC3VRWZV.cjs');
4
+ require('./chunk-YTLE5K7G.cjs');
5
5
  require('./chunk-VPBMIYO2.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "createWhatsAppLink", {
10
10
  enumerable: true,
11
- get: function () { return chunkNAJGGUAM_cjs.createWhatsAppLink; }
11
+ get: function () { return chunkTC3VRWZV_cjs.createWhatsAppLink; }
12
12
  });
package/dist/whatsapp.js CHANGED
@@ -1,3 +1,3 @@
1
- export { createWhatsAppLink } from './chunk-EMH4IP2U.js';
2
- import './chunk-6IPPANNX.js';
1
+ export { createWhatsAppLink } from './chunk-ZRONAQBV.js';
2
+ import './chunk-P7LVE2TF.js';
3
3
  import './chunk-ENQ7O7VW.js';
package/dist/yup.cjs CHANGED
@@ -1,18 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkGJENL6VK_cjs = require('./chunk-GJENL6VK.cjs');
4
- require('./chunk-3ZA265SK.cjs');
5
- require('./chunk-33FXHM2E.cjs');
6
- require('./chunk-HTERSQGF.cjs');
7
- require('./chunk-NTD4JLDW.cjs');
3
+ var chunkTBTWZC74_cjs = require('./chunk-TBTWZC74.cjs');
4
+ require('./chunk-SQIHFEXI.cjs');
5
+ require('./chunk-AUQFA7EE.cjs');
6
+ require('./chunk-7E7L3NYS.cjs');
7
+ require('./chunk-ESKXG7Y6.cjs');
8
+ require('./chunk-MTS6SVNP.cjs');
9
+ require('./chunk-YTLE5K7G.cjs');
8
10
  require('./chunk-H6M6L26S.cjs');
9
11
  require('./chunk-HTCSHHOR.cjs');
10
- require('./chunk-3IARSCO6.cjs');
12
+ require('./chunk-DHOP7LQX.cjs');
11
13
  require('./chunk-VPBMIYO2.cjs');
12
14
  var yup = require('yup');
13
15
 
14
16
  function schema(name) {
15
- const rule = chunkGJENL6VK_cjs.RULES[name];
17
+ const rule = chunkTBTWZC74_cjs.RULES[name];
16
18
  return (options = {}) => yup.string().test(
17
19
  `pk-${name}`,
18
20
  options.message ?? rule.message,
@@ -26,7 +28,9 @@ var pk = {
26
28
  iban: schema("iban"),
27
29
  ntn: schema("ntn"),
28
30
  strn: schema("strn"),
29
- landline: schema("landline")
31
+ landline: schema("landline"),
32
+ passport: schema("passport"),
33
+ vehiclePlate: schema("vehiclePlate")
30
34
  };
31
35
 
32
36
  exports.pk = pk;
package/dist/yup.d.cts CHANGED
@@ -17,6 +17,8 @@ declare const pk: {
17
17
  ntn: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
18
18
  strn: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
19
19
  landline: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
20
+ passport: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
21
+ vehiclePlate: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
20
22
  };
21
23
 
22
24
  export { AdapterOptions, pk };
package/dist/yup.d.ts CHANGED
@@ -17,6 +17,8 @@ declare const pk: {
17
17
  ntn: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
18
18
  strn: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
19
19
  landline: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
20
+ passport: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
21
+ vehiclePlate: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
20
22
  };
21
23
 
22
24
  export { AdapterOptions, pk };
package/dist/yup.js CHANGED
@@ -1,11 +1,13 @@
1
- import { RULES } from './chunk-HUQY2WR5.js';
2
- import './chunk-RXNYY5K5.js';
3
- import './chunk-PLDVGOKZ.js';
4
- import './chunk-AZV45DMG.js';
5
- import './chunk-6IPPANNX.js';
1
+ import { RULES } from './chunk-YTSMFGTW.js';
2
+ import './chunk-RZQJAZKC.js';
3
+ import './chunk-LQHM3ADX.js';
4
+ import './chunk-E6HSKRAE.js';
5
+ import './chunk-S274QFFB.js';
6
+ import './chunk-V2XE3NCG.js';
7
+ import './chunk-P7LVE2TF.js';
6
8
  import './chunk-CEPNSHIC.js';
7
9
  import './chunk-EEVNLTB4.js';
8
- import './chunk-YPPKY5XZ.js';
10
+ import './chunk-IBZPJS4H.js';
9
11
  import './chunk-ENQ7O7VW.js';
10
12
  import { string } from 'yup';
11
13
 
@@ -24,7 +26,9 @@ var pk = {
24
26
  iban: schema("iban"),
25
27
  ntn: schema("ntn"),
26
28
  strn: schema("strn"),
27
- landline: schema("landline")
29
+ landline: schema("landline"),
30
+ passport: schema("passport"),
31
+ vehiclePlate: schema("vehiclePlate")
28
32
  };
29
33
 
30
34
  export { pk };
package/dist/zod.cjs CHANGED
@@ -1,18 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkGJENL6VK_cjs = require('./chunk-GJENL6VK.cjs');
4
- require('./chunk-3ZA265SK.cjs');
5
- require('./chunk-33FXHM2E.cjs');
6
- require('./chunk-HTERSQGF.cjs');
7
- require('./chunk-NTD4JLDW.cjs');
3
+ var chunkTBTWZC74_cjs = require('./chunk-TBTWZC74.cjs');
4
+ require('./chunk-SQIHFEXI.cjs');
5
+ require('./chunk-AUQFA7EE.cjs');
6
+ require('./chunk-7E7L3NYS.cjs');
7
+ require('./chunk-ESKXG7Y6.cjs');
8
+ require('./chunk-MTS6SVNP.cjs');
9
+ require('./chunk-YTLE5K7G.cjs');
8
10
  require('./chunk-H6M6L26S.cjs');
9
11
  require('./chunk-HTCSHHOR.cjs');
10
- require('./chunk-3IARSCO6.cjs');
12
+ require('./chunk-DHOP7LQX.cjs');
11
13
  require('./chunk-VPBMIYO2.cjs');
12
14
  var zod = require('zod');
13
15
 
14
16
  function schema(name) {
15
- const rule = chunkGJENL6VK_cjs.RULES[name];
17
+ const rule = chunkTBTWZC74_cjs.RULES[name];
16
18
  return (options = {}) => zod.z.string().refine(rule.test, { message: options.message ?? rule.message });
17
19
  }
18
20
  var pk = {
@@ -21,7 +23,9 @@ var pk = {
21
23
  iban: schema("iban"),
22
24
  ntn: schema("ntn"),
23
25
  strn: schema("strn"),
24
- landline: schema("landline")
26
+ landline: schema("landline"),
27
+ passport: schema("passport"),
28
+ vehiclePlate: schema("vehiclePlate")
25
29
  };
26
30
 
27
31
  exports.pk = pk;
package/dist/zod.d.cts CHANGED
@@ -17,6 +17,8 @@ declare const pk: {
17
17
  ntn: (options?: AdapterOptions) => z.ZodString;
18
18
  strn: (options?: AdapterOptions) => z.ZodString;
19
19
  landline: (options?: AdapterOptions) => z.ZodString;
20
+ passport: (options?: AdapterOptions) => z.ZodString;
21
+ vehiclePlate: (options?: AdapterOptions) => z.ZodString;
20
22
  };
21
23
 
22
24
  export { AdapterOptions, pk };
package/dist/zod.d.ts CHANGED
@@ -17,6 +17,8 @@ declare const pk: {
17
17
  ntn: (options?: AdapterOptions) => z.ZodString;
18
18
  strn: (options?: AdapterOptions) => z.ZodString;
19
19
  landline: (options?: AdapterOptions) => z.ZodString;
20
+ passport: (options?: AdapterOptions) => z.ZodString;
21
+ vehiclePlate: (options?: AdapterOptions) => z.ZodString;
20
22
  };
21
23
 
22
24
  export { AdapterOptions, pk };
package/dist/zod.js CHANGED
@@ -1,11 +1,13 @@
1
- import { RULES } from './chunk-HUQY2WR5.js';
2
- import './chunk-RXNYY5K5.js';
3
- import './chunk-PLDVGOKZ.js';
4
- import './chunk-AZV45DMG.js';
5
- import './chunk-6IPPANNX.js';
1
+ import { RULES } from './chunk-YTSMFGTW.js';
2
+ import './chunk-RZQJAZKC.js';
3
+ import './chunk-LQHM3ADX.js';
4
+ import './chunk-E6HSKRAE.js';
5
+ import './chunk-S274QFFB.js';
6
+ import './chunk-V2XE3NCG.js';
7
+ import './chunk-P7LVE2TF.js';
6
8
  import './chunk-CEPNSHIC.js';
7
9
  import './chunk-EEVNLTB4.js';
8
- import './chunk-YPPKY5XZ.js';
10
+ import './chunk-IBZPJS4H.js';
9
11
  import './chunk-ENQ7O7VW.js';
10
12
  import { z } from 'zod';
11
13
 
@@ -19,7 +21,9 @@ var pk = {
19
21
  iban: schema("iban"),
20
22
  ntn: schema("ntn"),
21
23
  strn: schema("strn"),
22
- landline: schema("landline")
24
+ landline: schema("landline"),
25
+ passport: schema("passport"),
26
+ vehiclePlate: schema("vehiclePlate")
23
27
  };
24
28
 
25
29
  export { pk };
package/package.json CHANGED
@@ -1,11 +1,21 @@
1
1
  {
2
2
  "name": "pakdatakit",
3
- "version": "2.2.1",
4
- "description": "Production-ready utility toolkit for Pakistani developers — CNIC, phone, WhatsApp, IBAN, postal codes, address parsing, Hijri dates, Roman Urdu, networks, geography, and formatting",
3
+ "version": "2.3.0",
4
+ "description": "Pakistani data toolkit for TypeScript/JavaScript: validate CNIC, mobile, IBAN, NTN/STRN, passport and vehicle numbers; Raast QR codes, banks, mobile networks, postal codes, districts, holidays, Hijri dates, amounts in words. Zero dependencies, with Zod, Valibot, Yup, Joi, Superstruct and class-validator adapters.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
+ "typesVersions": {
10
+ "*": {
11
+ "dist/*": [
12
+ "./dist/*"
13
+ ],
14
+ "*": [
15
+ "./dist/*.d.ts"
16
+ ]
17
+ }
18
+ },
9
19
  "bin": {
10
20
  "pakdatakit": "./dist/cli.js"
11
21
  },
@@ -120,6 +130,16 @@
120
130
  "default": "./dist/numbers.cjs"
121
131
  }
122
132
  },
133
+ "./passport": {
134
+ "import": {
135
+ "types": "./dist/passport.d.ts",
136
+ "default": "./dist/passport.js"
137
+ },
138
+ "require": {
139
+ "types": "./dist/passport.d.cts",
140
+ "default": "./dist/passport.cjs"
141
+ }
142
+ },
123
143
  "./phone": {
124
144
  "import": {
125
145
  "types": "./dist/phone.d.ts",
@@ -170,6 +190,16 @@
170
190
  "default": "./dist/text.cjs"
171
191
  }
172
192
  },
193
+ "./vehicle": {
194
+ "import": {
195
+ "types": "./dist/vehicle.d.ts",
196
+ "default": "./dist/vehicle.js"
197
+ },
198
+ "require": {
199
+ "types": "./dist/vehicle.d.cts",
200
+ "default": "./dist/vehicle.cjs"
201
+ }
202
+ },
173
203
  "./whatsapp": {
174
204
  "import": {
175
205
  "types": "./dist/whatsapp.d.ts",
@@ -190,6 +220,36 @@
190
220
  "default": "./dist/words.cjs"
191
221
  }
192
222
  },
223
+ "./class-validator": {
224
+ "import": {
225
+ "types": "./dist/class-validator.d.ts",
226
+ "default": "./dist/class-validator.js"
227
+ },
228
+ "require": {
229
+ "types": "./dist/class-validator.d.cts",
230
+ "default": "./dist/class-validator.cjs"
231
+ }
232
+ },
233
+ "./joi": {
234
+ "import": {
235
+ "types": "./dist/joi.d.ts",
236
+ "default": "./dist/joi.js"
237
+ },
238
+ "require": {
239
+ "types": "./dist/joi.d.cts",
240
+ "default": "./dist/joi.cjs"
241
+ }
242
+ },
243
+ "./superstruct": {
244
+ "import": {
245
+ "types": "./dist/superstruct.d.ts",
246
+ "default": "./dist/superstruct.js"
247
+ },
248
+ "require": {
249
+ "types": "./dist/superstruct.d.cts",
250
+ "default": "./dist/superstruct.cjs"
251
+ }
252
+ },
193
253
  "./valibot": {
194
254
  "import": {
195
255
  "types": "./dist/valibot.d.ts",
@@ -237,6 +297,7 @@
237
297
  "lint": "eslint src tests",
238
298
  "format": "prettier --write .",
239
299
  "format:check": "prettier --check .",
300
+ "size": "node scripts/check-size.mjs",
240
301
  "typecheck": "tsc --noEmit",
241
302
  "prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build",
242
303
  "docs": "typedoc && node scripts/generate-llms.mjs"
@@ -270,7 +331,29 @@
270
331
  "valibot",
271
332
  "yup",
272
333
  "amount-in-words",
273
- "landline"
334
+ "landline",
335
+ "pakistani",
336
+ "validation",
337
+ "validator",
338
+ "cnic-validation",
339
+ "iban-validation",
340
+ "raast-qr",
341
+ "passport",
342
+ "vehicle-registration",
343
+ "number-plate",
344
+ "nadra",
345
+ "pta",
346
+ "sbp",
347
+ "fbr",
348
+ "joi",
349
+ "superstruct",
350
+ "class-validator",
351
+ "nestjs",
352
+ "form-validation",
353
+ "lakh-crore",
354
+ "roman-urdu",
355
+ "esm",
356
+ "commonjs"
274
357
  ],
275
358
  "author": "Muzamil Chaudhery",
276
359
  "homepage": "https://github.com/chmuzamil/pakdatakit#readme",
@@ -290,11 +373,14 @@
290
373
  "@types/node": "^26.6.5",
291
374
  "@typescript-eslint/eslint-plugin": "^8.72.0",
292
375
  "@typescript-eslint/parser": "^8.72.0",
376
+ "class-validator": "^0.15.1",
293
377
  "eslint": "^10.13.0",
294
378
  "eslint-config-prettier": "^10.1.5",
295
379
  "globals": "^17.6.0",
380
+ "joi": "^18.3.2",
296
381
  "libphonenumber-js": "^1.13.15",
297
382
  "prettier": "^3.9.10",
383
+ "superstruct": "^2.0.2",
298
384
  "tsup": "^9.0.0",
299
385
  "typedoc": "^0.28.20",
300
386
  "typescript": "^5.8.3",
@@ -304,11 +390,23 @@
304
390
  "zod": "^4.6.7"
305
391
  },
306
392
  "peerDependencies": {
393
+ "class-validator": ">=0.14.0",
394
+ "joi": ">=17.0.0",
395
+ "superstruct": ">=1.0.0",
307
396
  "valibot": ">=1.0.0",
308
397
  "yup": ">=1.0.0",
309
398
  "zod": "^3.23.0 || ^4.0.0"
310
399
  },
311
400
  "peerDependenciesMeta": {
401
+ "class-validator": {
402
+ "optional": true
403
+ },
404
+ "joi": {
405
+ "optional": true
406
+ },
407
+ "superstruct": {
408
+ "optional": true
409
+ },
312
410
  "valibot": {
313
411
  "optional": true
314
412
  },