pakdatakit 1.0.2 → 2.1.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 (125) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +907 -597
  3. package/dist/address.cjs +17 -0
  4. package/dist/address.d.cts +36 -0
  5. package/dist/address.d.ts +36 -0
  6. package/dist/address.js +4 -0
  7. package/dist/chunk-3COX5FSL.cjs +1650 -0
  8. package/dist/chunk-422X6FEZ.cjs +220 -0
  9. package/dist/chunk-432ZYMYV.js +31 -0
  10. package/dist/chunk-4VVFS6FN.cjs +715 -0
  11. package/dist/chunk-6TSKA2PH.js +38 -0
  12. package/dist/chunk-APXP7OK7.cjs +226 -0
  13. package/dist/chunk-AUATLZA5.cjs +168 -0
  14. package/dist/chunk-BSS4Z7NI.cjs +422 -0
  15. package/dist/chunk-CEPNSHIC.js +33 -0
  16. package/dist/chunk-CQKK3S7A.js +217 -0
  17. package/dist/chunk-CYJJ7KGC.cjs +108 -0
  18. package/dist/chunk-EEVNLTB4.js +32 -0
  19. package/dist/chunk-ENQ7O7VW.js +32 -0
  20. package/dist/chunk-H4DVWUYH.js +231 -0
  21. package/dist/chunk-H6M6L26S.cjs +37 -0
  22. package/dist/chunk-HBOZIITD.js +351 -0
  23. package/dist/chunk-HTCSHHOR.cjs +35 -0
  24. package/dist/chunk-JKE4AMSZ.js +47 -0
  25. package/dist/chunk-K6CZFCX6.js +1642 -0
  26. package/dist/chunk-KEHCTYLO.cjs +52 -0
  27. package/dist/chunk-KQKW2ZEK.cjs +18 -0
  28. package/dist/chunk-L2BDDM2W.js +165 -0
  29. package/dist/chunk-L45UXUWX.js +21 -0
  30. package/dist/chunk-LIYNKIKS.js +709 -0
  31. package/dist/chunk-LVHTH4P7.cjs +41 -0
  32. package/dist/chunk-OVUR47QH.cjs +22 -0
  33. package/dist/chunk-P4CGOJEM.js +16 -0
  34. package/dist/chunk-PHHKIMO2.cjs +35 -0
  35. package/dist/chunk-QQQKISXT.js +223 -0
  36. package/dist/chunk-T3E4B5MJ.js +417 -0
  37. package/dist/chunk-VPBMIYO2.cjs +38 -0
  38. package/dist/chunk-WPKV5JT3.cjs +235 -0
  39. package/dist/chunk-XCXFGTHW.cjs +355 -0
  40. package/dist/chunk-XT4ZNXRC.js +20 -0
  41. package/dist/chunk-Y6BUGLXU.js +95 -0
  42. package/dist/chunk-YLWZGSFY.cjs +99 -0
  43. package/dist/chunk-YS7MOLK2.cjs +23 -0
  44. package/dist/chunk-Z5JEIQVW.js +102 -0
  45. package/dist/cli.js +129 -0
  46. package/dist/cnic.cjs +15 -0
  47. package/dist/cnic.d.cts +35 -0
  48. package/dist/cnic.d.ts +35 -0
  49. package/dist/cnic.js +2 -0
  50. package/dist/format.cjs +14 -0
  51. package/dist/format.d.cts +27 -0
  52. package/dist/format.d.ts +27 -0
  53. package/dist/format.js +1 -0
  54. package/dist/geo.cjs +27 -0
  55. package/dist/geo.d.cts +43 -0
  56. package/dist/geo.d.ts +43 -0
  57. package/dist/geo.js +2 -0
  58. package/dist/hijri.cjs +26 -0
  59. package/dist/hijri.d.cts +62 -0
  60. package/dist/hijri.d.ts +62 -0
  61. package/dist/hijri.js +1 -0
  62. package/dist/holidays.cjs +19 -0
  63. package/dist/holidays.d.cts +72 -0
  64. package/dist/holidays.d.ts +72 -0
  65. package/dist/holidays.js +2 -0
  66. package/dist/iban.cjs +15 -0
  67. package/dist/iban.d.cts +21 -0
  68. package/dist/iban.d.ts +21 -0
  69. package/dist/iban.js +2 -0
  70. package/dist/index.cjs +211 -0
  71. package/dist/index.d.cts +16 -0
  72. package/dist/index.d.ts +16 -190
  73. package/dist/index.js +18 -2465
  74. package/dist/networks.cjs +12 -0
  75. package/dist/networks.d.cts +20 -0
  76. package/dist/networks.d.ts +20 -0
  77. package/dist/networks.js +3 -0
  78. package/dist/numbers.cjs +24 -0
  79. package/dist/numbers.d.cts +53 -0
  80. package/dist/numbers.d.ts +53 -0
  81. package/dist/numbers.js +3 -0
  82. package/dist/phone.cjs +29 -0
  83. package/dist/phone.d.cts +56 -0
  84. package/dist/phone.d.ts +56 -0
  85. package/dist/phone.js +4 -0
  86. package/dist/postal.cjs +27 -0
  87. package/dist/postal.d.cts +40 -0
  88. package/dist/postal.d.ts +40 -0
  89. package/dist/postal.js +2 -0
  90. package/dist/raast.cjs +20 -0
  91. package/dist/raast.d.cts +119 -0
  92. package/dist/raast.d.ts +119 -0
  93. package/dist/raast.js +3 -0
  94. package/dist/rules-GxgPiVws.d.cts +7 -0
  95. package/dist/rules-GxgPiVws.d.ts +7 -0
  96. package/dist/tax.cjs +20 -0
  97. package/dist/tax.d.cts +47 -0
  98. package/dist/tax.d.ts +47 -0
  99. package/dist/tax.js +3 -0
  100. package/dist/text.cjs +23 -0
  101. package/dist/text.d.cts +34 -0
  102. package/dist/text.d.ts +34 -0
  103. package/dist/text.js +2 -0
  104. package/dist/valibot.cjs +47 -0
  105. package/dist/valibot.d.cts +22 -0
  106. package/dist/valibot.d.ts +22 -0
  107. package/dist/valibot.js +25 -0
  108. package/dist/whatsapp.cjs +12 -0
  109. package/dist/whatsapp.d.cts +12 -0
  110. package/dist/whatsapp.d.ts +12 -0
  111. package/dist/whatsapp.js +3 -0
  112. package/dist/words.cjs +14 -0
  113. package/dist/words.d.cts +49 -0
  114. package/dist/words.d.ts +49 -0
  115. package/dist/words.js +1 -0
  116. package/dist/yup.cjs +32 -0
  117. package/dist/yup.d.cts +22 -0
  118. package/dist/yup.d.ts +22 -0
  119. package/dist/yup.js +30 -0
  120. package/dist/zod.cjs +27 -0
  121. package/dist/zod.d.cts +22 -0
  122. package/dist/zod.d.ts +22 -0
  123. package/dist/zod.js +25 -0
  124. package/package.json +309 -69
  125. package/dist/index.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunkAUATLZA5_cjs = require('./chunk-AUATLZA5.cjs');
4
+ require('./chunk-4VVFS6FN.cjs');
5
+ require('./chunk-3COX5FSL.cjs');
6
+ require('./chunk-VPBMIYO2.cjs');
7
+
8
+
9
+
10
+ Object.defineProperty(exports, "formatAddress", {
11
+ enumerable: true,
12
+ get: function () { return chunkAUATLZA5_cjs.formatAddress; }
13
+ });
14
+ Object.defineProperty(exports, "parseAddress", {
15
+ enumerable: true,
16
+ get: function () { return chunkAUATLZA5_cjs.parseAddress; }
17
+ });
@@ -0,0 +1,36 @@
1
+ /** Parsed components of a Pakistani mailing address. */
2
+ interface ParsedAddress {
3
+ raw: string;
4
+ street: string | null;
5
+ area: string | null;
6
+ city: string | null;
7
+ district: string | null;
8
+ province: string | null;
9
+ postalCode: string | null;
10
+ /** Inconsistencies found while parsing, e.g. a city in a different province. */
11
+ warnings: string[];
12
+ }
13
+ /**
14
+ * Parses a free-form Pakistani address into structured components.
15
+ *
16
+ * Extracts postal codes, matches known cities/districts/provinces from datasets,
17
+ * and assigns remaining segments to street and area fields. Works with or
18
+ * without commas between components.
19
+ *
20
+ * @param address - Raw address string
21
+ * @returns Structured address components
22
+ */
23
+ declare function parseAddress(address: string): ParsedAddress;
24
+ /**
25
+ * Formats structured address components into a single mailing line.
26
+ *
27
+ * Only the components provided are included; no postal code is invented.
28
+ *
29
+ * @param parts - Address components to format
30
+ * @returns Formatted address string
31
+ */
32
+ declare function formatAddress(parts: Partial<ParsedAddress> & {
33
+ raw?: string;
34
+ }): string;
35
+
36
+ export { type ParsedAddress, formatAddress, parseAddress };
@@ -0,0 +1,36 @@
1
+ /** Parsed components of a Pakistani mailing address. */
2
+ interface ParsedAddress {
3
+ raw: string;
4
+ street: string | null;
5
+ area: string | null;
6
+ city: string | null;
7
+ district: string | null;
8
+ province: string | null;
9
+ postalCode: string | null;
10
+ /** Inconsistencies found while parsing, e.g. a city in a different province. */
11
+ warnings: string[];
12
+ }
13
+ /**
14
+ * Parses a free-form Pakistani address into structured components.
15
+ *
16
+ * Extracts postal codes, matches known cities/districts/provinces from datasets,
17
+ * and assigns remaining segments to street and area fields. Works with or
18
+ * without commas between components.
19
+ *
20
+ * @param address - Raw address string
21
+ * @returns Structured address components
22
+ */
23
+ declare function parseAddress(address: string): ParsedAddress;
24
+ /**
25
+ * Formats structured address components into a single mailing line.
26
+ *
27
+ * Only the components provided are included; no postal code is invented.
28
+ *
29
+ * @param parts - Address components to format
30
+ * @returns Formatted address string
31
+ */
32
+ declare function formatAddress(parts: Partial<ParsedAddress> & {
33
+ raw?: string;
34
+ }): string;
35
+
36
+ export { type ParsedAddress, formatAddress, parseAddress };
@@ -0,0 +1,4 @@
1
+ export { formatAddress, parseAddress } from './chunk-L2BDDM2W.js';
2
+ import './chunk-LIYNKIKS.js';
3
+ import './chunk-K6CZFCX6.js';
4
+ import './chunk-ENQ7O7VW.js';