pakdatakit 2.3.0 → 2.5.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/DATA.md +212 -3
- package/LICENSE +1 -1
- package/NOTICE +14 -0
- package/README.md +426 -207
- package/dist/address.cjs +5 -4
- package/dist/address.js +3 -2
- package/dist/bills.cjs +19 -0
- package/dist/bills.d.cts +63 -0
- package/dist/bills.d.ts +63 -0
- package/dist/bills.js +2 -0
- package/dist/{chunk-OKMBYX3F.cjs → chunk-33GOK7EE.cjs} +2 -910
- package/dist/chunk-34U2ZMHR.js +194 -0
- package/dist/chunk-4GSBHJX6.js +165 -0
- package/dist/chunk-5DDHO5Z7.cjs +565 -0
- package/dist/chunk-5EY5DQS7.js +51 -0
- package/dist/chunk-5RGX4DWF.js +559 -0
- package/dist/chunk-5UCRHVI4.cjs +302 -0
- package/dist/{chunk-TQP2T33V.js → chunk-B7DOQ5QF.js} +2 -1
- package/dist/chunk-CF6AMRBU.cjs +198 -0
- package/dist/chunk-CZOZB4K3.js +61 -0
- package/dist/chunk-E2XU6NOW.js +909 -0
- package/dist/chunk-E6GWBOKV.cjs +911 -0
- package/dist/chunk-EA3SIHYT.js +313 -0
- package/dist/{chunk-YTSMFGTW.js → chunk-IDTRFOQW.js} +8 -3
- package/dist/chunk-OTI7HY55.js +297 -0
- package/dist/{chunk-J5ARB4TE.cjs → chunk-QFPEFD67.cjs} +5 -4
- package/dist/chunk-SF4ECUZ6.cjs +56 -0
- package/dist/chunk-UYFTXD4P.js +168 -0
- package/dist/{chunk-TBTWZC74.cjs → chunk-XCFZKCV2.cjs} +8 -3
- package/dist/{chunk-N4S22XX3.js → chunk-XOTCIXY6.js} +2 -909
- package/dist/chunk-XVEG53NN.cjs +322 -0
- package/dist/chunk-YDUXIENX.cjs +172 -0
- package/dist/chunk-YPAWNWFD.cjs +168 -0
- package/dist/chunk-YQFI7W3I.cjs +65 -0
- package/dist/class-validator.cjs +16 -8
- package/dist/class-validator.d.cts +7 -1
- package/dist/class-validator.d.ts +7 -1
- package/dist/class-validator.js +15 -8
- package/dist/cli.js +1 -1
- package/dist/courier.cjs +16 -0
- package/dist/courier.d.cts +51 -0
- package/dist/courier.d.ts +51 -0
- package/dist/courier.js +3 -0
- package/dist/fbr-invoice.cjs +25 -0
- package/dist/fbr-invoice.d.cts +170 -0
- package/dist/fbr-invoice.d.ts +170 -0
- package/dist/fbr-invoice.js +4 -0
- package/dist/geo.cjs +11 -10
- package/dist/geo.js +2 -1
- package/dist/incometax.cjs +27 -0
- package/dist/incometax.d.cts +91 -0
- package/dist/incometax.d.ts +91 -0
- package/dist/incometax.js +2 -0
- package/dist/index.cjs +227 -123
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +21 -13
- package/dist/input.cjs +8 -8
- package/dist/input.js +2 -2
- package/dist/joi.cjs +14 -8
- package/dist/joi.d.cts +1 -0
- package/dist/joi.d.ts +1 -0
- package/dist/joi.js +13 -7
- package/dist/quality.cjs +25 -0
- package/dist/quality.d.cts +62 -0
- package/dist/quality.d.ts +62 -0
- package/dist/quality.js +8 -0
- package/dist/salestax.cjs +20 -0
- package/dist/salestax.d.cts +106 -0
- package/dist/salestax.d.ts +106 -0
- package/dist/salestax.js +3 -0
- package/dist/superstruct.cjs +14 -8
- package/dist/superstruct.d.cts +1 -0
- package/dist/superstruct.d.ts +1 -0
- package/dist/superstruct.js +13 -7
- package/dist/text.cjs +21 -5
- package/dist/text.d.cts +90 -1
- package/dist/text.d.ts +90 -1
- package/dist/text.js +1 -1
- package/dist/valibot.cjs +14 -8
- package/dist/valibot.d.cts +1 -0
- package/dist/valibot.d.ts +1 -0
- package/dist/valibot.js +13 -7
- package/dist/yup.cjs +14 -8
- package/dist/yup.d.cts +1 -0
- package/dist/yup.d.ts +1 -0
- package/dist/yup.js +13 -7
- package/dist/zod.cjs +14 -8
- package/dist/zod.d.cts +1 -0
- package/dist/zod.d.ts +1 -0
- package/dist/zod.js +13 -7
- package/package.json +74 -11
- package/dist/chunk-JKE4AMSZ.js +0 -47
- package/dist/chunk-KEHCTYLO.cjs +0 -52
- package/dist/{chunk-A3HBEBXY.js → chunk-7DY26QPN.js} +1 -1
- package/dist/{chunk-FRBPAGEJ.cjs → chunk-TVL6RDAU.cjs} +1 -1
package/dist/text.d.cts
CHANGED
|
@@ -30,5 +30,94 @@ declare function toUrduDigits(text: string): string;
|
|
|
30
30
|
* @returns Text with English digits
|
|
31
31
|
*/
|
|
32
32
|
declare function toEnglishDigits(text: string): string;
|
|
33
|
+
/** Which letters {@link slugify} keeps. */
|
|
34
|
+
type SlugScript = 'any' | 'latin' | 'urdu';
|
|
35
|
+
/** Options for {@link slugify}. */
|
|
36
|
+
interface SlugifyOptions {
|
|
37
|
+
/**
|
|
38
|
+
* `any` (default) keeps Latin and Urdu letters, `latin` keeps only `a-z`,
|
|
39
|
+
* `urdu` keeps only Urdu letters. Digits are always kept, as `0-9`.
|
|
40
|
+
*/
|
|
41
|
+
script?: SlugScript;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Turns text into a URL slug: lower-case words joined by `-`.
|
|
45
|
+
*
|
|
46
|
+
* Urdu letters are kept as they are (no transliteration: Urdu does not write
|
|
47
|
+
* short vowels, so there is no single Roman spelling). Diacritics, tatweel
|
|
48
|
+
* and zero-width characters are dropped, the Arabic look-alikes ك ي ى become
|
|
49
|
+
* the Urdu ک ی ی, Urdu and Arabic-Indic digits become `0-9`, and accented
|
|
50
|
+
* Latin-1 letters lose their accents (`é` → `e`, `ß` → `ss`). Anything else
|
|
51
|
+
* separates words.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* slugify('Lahore Fort, 2024'); // "lahore-fort-2024"
|
|
55
|
+
* slugify('لاہور قلعہ'); // "لاہور-قلعہ"
|
|
56
|
+
* slugify('لاہور Fort', { script: 'latin' }); // "fort"
|
|
57
|
+
* slugify('کراچی ۲۰۲۴', { script: 'urdu' }); // "کراچی-2024"
|
|
58
|
+
*
|
|
59
|
+
* @returns The slug, or `''` when nothing is left (or the input is not a
|
|
60
|
+
* string). Never throws.
|
|
61
|
+
*/
|
|
62
|
+
declare function slugify(input: string, options?: SlugifyOptions): string;
|
|
63
|
+
/**
|
|
64
|
+
* Compares two strings in Urdu alphabetical order, for `Array.sort`.
|
|
65
|
+
*
|
|
66
|
+
* Letters follow the Unicode CLDR collation for Urdu (`ur`, CLDR 49):
|
|
67
|
+
* ا آ ب بھ پ پھ ت تھ ٹ ٹھ ث ج جھ چ چھ ح خ د دھ ڈ ڈھ ذ ر رھ ڑ ڑھ ز ژ س ش ص ض
|
|
68
|
+
* ط ظ ع غ ف ق ک کھ گ گھ ل لھ م مھ ن نھ ں ںھ و وھ ہ ھ ۃ ء ی یھ ے. A letter
|
|
69
|
+
* joined with ھ is a letter of its own (so بھ comes after every other ب
|
|
70
|
+
* word). أ ؤ ۂ ئ ۓ sort as ا و ہ ی ے and come just after them when words are
|
|
71
|
+
* otherwise equal, and diacritics only break ties, in CLDR's order.
|
|
72
|
+
*
|
|
73
|
+
* Outside the Urdu letters: spaces and punctuation come first, then digits
|
|
74
|
+
* digit by digit (Urdu, Arabic-Indic and ASCII digits are equal; `10` comes
|
|
75
|
+
* before `2`), then Urdu letters, then other Arabic-script characters (the
|
|
76
|
+
* look-alikes ك ي ى ه ة, which CLDR does not treat as Urdu letters), then
|
|
77
|
+
* everything else by code point, ignoring ASCII case. Strings that are
|
|
78
|
+
* still equal are ordered by code point, so the result is 0 only for
|
|
79
|
+
* identical strings.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ['ے', 'بھائی', 'آم', 'باغ', 'اب'].sort(compareUrdu);
|
|
83
|
+
* // ["اب", "آم", "باغ", "بھائی", "ے"]
|
|
84
|
+
*
|
|
85
|
+
* @returns `-1`, `0` or `1`. A value that is not a string is treated as
|
|
86
|
+
* `''`. Never throws.
|
|
87
|
+
*/
|
|
88
|
+
declare function compareUrdu(a: string, b: string): -1 | 0 | 1;
|
|
89
|
+
/**
|
|
90
|
+
* Whether text reads right to left: its first letter is from a right-to-left
|
|
91
|
+
* script such as Urdu or Arabic. Digits, punctuation and spaces are skipped,
|
|
92
|
+
* as in the Unicode bidirectional algorithm's paragraph rule.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* isRTL('سلام'); // true
|
|
96
|
+
* isRTL('123 سلام'); // true
|
|
97
|
+
* isRTL('Order نمبر'); // false
|
|
98
|
+
*
|
|
99
|
+
* @returns `false` when there is no letter, or the input is not a string.
|
|
100
|
+
* Never throws.
|
|
101
|
+
*/
|
|
102
|
+
declare function isRTL(text: string): boolean;
|
|
103
|
+
/** Direction for {@link wrapBidi}. */
|
|
104
|
+
type BidiDirection = 'auto' | 'rtl' | 'ltr';
|
|
105
|
+
/**
|
|
106
|
+
* Wraps text in Unicode directional isolates, so a name or number in one
|
|
107
|
+
* direction does not reorder the sentence around it (for example an English
|
|
108
|
+
* order number inside an Urdu message).
|
|
109
|
+
*
|
|
110
|
+
* Uses FIRST STRONG ISOLATE (U+2068) by default, RIGHT-TO-LEFT ISOLATE
|
|
111
|
+
* (U+2067) for `rtl` and LEFT-TO-RIGHT ISOLATE (U+2066) for `ltr`, closed
|
|
112
|
+
* with POP DIRECTIONAL ISOLATE (U+2069). Any other direction is `auto`.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* `آرڈر ${wrapBidi('PDK-1042')} بھیج دیا گیا`;
|
|
116
|
+
*
|
|
117
|
+
* @returns The wrapped text, or `''` when the input is not a string. Never
|
|
118
|
+
* throws.
|
|
119
|
+
*/
|
|
120
|
+
declare function wrapBidi(text: string, direction?: BidiDirection): string;
|
|
33
121
|
|
|
34
|
-
export { normalizeRomanUrdu, normalizeText, toEnglishDigits, toUrduDigits };
|
|
122
|
+
export { compareUrdu, isRTL, normalizeRomanUrdu, normalizeText, slugify, toEnglishDigits, toUrduDigits, wrapBidi };
|
|
123
|
+
export type { BidiDirection, SlugScript, SlugifyOptions };
|
package/dist/text.d.ts
CHANGED
|
@@ -30,5 +30,94 @@ declare function toUrduDigits(text: string): string;
|
|
|
30
30
|
* @returns Text with English digits
|
|
31
31
|
*/
|
|
32
32
|
declare function toEnglishDigits(text: string): string;
|
|
33
|
+
/** Which letters {@link slugify} keeps. */
|
|
34
|
+
type SlugScript = 'any' | 'latin' | 'urdu';
|
|
35
|
+
/** Options for {@link slugify}. */
|
|
36
|
+
interface SlugifyOptions {
|
|
37
|
+
/**
|
|
38
|
+
* `any` (default) keeps Latin and Urdu letters, `latin` keeps only `a-z`,
|
|
39
|
+
* `urdu` keeps only Urdu letters. Digits are always kept, as `0-9`.
|
|
40
|
+
*/
|
|
41
|
+
script?: SlugScript;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Turns text into a URL slug: lower-case words joined by `-`.
|
|
45
|
+
*
|
|
46
|
+
* Urdu letters are kept as they are (no transliteration: Urdu does not write
|
|
47
|
+
* short vowels, so there is no single Roman spelling). Diacritics, tatweel
|
|
48
|
+
* and zero-width characters are dropped, the Arabic look-alikes ك ي ى become
|
|
49
|
+
* the Urdu ک ی ی, Urdu and Arabic-Indic digits become `0-9`, and accented
|
|
50
|
+
* Latin-1 letters lose their accents (`é` → `e`, `ß` → `ss`). Anything else
|
|
51
|
+
* separates words.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* slugify('Lahore Fort, 2024'); // "lahore-fort-2024"
|
|
55
|
+
* slugify('لاہور قلعہ'); // "لاہور-قلعہ"
|
|
56
|
+
* slugify('لاہور Fort', { script: 'latin' }); // "fort"
|
|
57
|
+
* slugify('کراچی ۲۰۲۴', { script: 'urdu' }); // "کراچی-2024"
|
|
58
|
+
*
|
|
59
|
+
* @returns The slug, or `''` when nothing is left (or the input is not a
|
|
60
|
+
* string). Never throws.
|
|
61
|
+
*/
|
|
62
|
+
declare function slugify(input: string, options?: SlugifyOptions): string;
|
|
63
|
+
/**
|
|
64
|
+
* Compares two strings in Urdu alphabetical order, for `Array.sort`.
|
|
65
|
+
*
|
|
66
|
+
* Letters follow the Unicode CLDR collation for Urdu (`ur`, CLDR 49):
|
|
67
|
+
* ا آ ب بھ پ پھ ت تھ ٹ ٹھ ث ج جھ چ چھ ح خ د دھ ڈ ڈھ ذ ر رھ ڑ ڑھ ز ژ س ش ص ض
|
|
68
|
+
* ط ظ ع غ ف ق ک کھ گ گھ ل لھ م مھ ن نھ ں ںھ و وھ ہ ھ ۃ ء ی یھ ے. A letter
|
|
69
|
+
* joined with ھ is a letter of its own (so بھ comes after every other ب
|
|
70
|
+
* word). أ ؤ ۂ ئ ۓ sort as ا و ہ ی ے and come just after them when words are
|
|
71
|
+
* otherwise equal, and diacritics only break ties, in CLDR's order.
|
|
72
|
+
*
|
|
73
|
+
* Outside the Urdu letters: spaces and punctuation come first, then digits
|
|
74
|
+
* digit by digit (Urdu, Arabic-Indic and ASCII digits are equal; `10` comes
|
|
75
|
+
* before `2`), then Urdu letters, then other Arabic-script characters (the
|
|
76
|
+
* look-alikes ك ي ى ه ة, which CLDR does not treat as Urdu letters), then
|
|
77
|
+
* everything else by code point, ignoring ASCII case. Strings that are
|
|
78
|
+
* still equal are ordered by code point, so the result is 0 only for
|
|
79
|
+
* identical strings.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ['ے', 'بھائی', 'آم', 'باغ', 'اب'].sort(compareUrdu);
|
|
83
|
+
* // ["اب", "آم", "باغ", "بھائی", "ے"]
|
|
84
|
+
*
|
|
85
|
+
* @returns `-1`, `0` or `1`. A value that is not a string is treated as
|
|
86
|
+
* `''`. Never throws.
|
|
87
|
+
*/
|
|
88
|
+
declare function compareUrdu(a: string, b: string): -1 | 0 | 1;
|
|
89
|
+
/**
|
|
90
|
+
* Whether text reads right to left: its first letter is from a right-to-left
|
|
91
|
+
* script such as Urdu or Arabic. Digits, punctuation and spaces are skipped,
|
|
92
|
+
* as in the Unicode bidirectional algorithm's paragraph rule.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* isRTL('سلام'); // true
|
|
96
|
+
* isRTL('123 سلام'); // true
|
|
97
|
+
* isRTL('Order نمبر'); // false
|
|
98
|
+
*
|
|
99
|
+
* @returns `false` when there is no letter, or the input is not a string.
|
|
100
|
+
* Never throws.
|
|
101
|
+
*/
|
|
102
|
+
declare function isRTL(text: string): boolean;
|
|
103
|
+
/** Direction for {@link wrapBidi}. */
|
|
104
|
+
type BidiDirection = 'auto' | 'rtl' | 'ltr';
|
|
105
|
+
/**
|
|
106
|
+
* Wraps text in Unicode directional isolates, so a name or number in one
|
|
107
|
+
* direction does not reorder the sentence around it (for example an English
|
|
108
|
+
* order number inside an Urdu message).
|
|
109
|
+
*
|
|
110
|
+
* Uses FIRST STRONG ISOLATE (U+2068) by default, RIGHT-TO-LEFT ISOLATE
|
|
111
|
+
* (U+2067) for `rtl` and LEFT-TO-RIGHT ISOLATE (U+2066) for `ltr`, closed
|
|
112
|
+
* with POP DIRECTIONAL ISOLATE (U+2069). Any other direction is `auto`.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* `آرڈر ${wrapBidi('PDK-1042')} بھیج دیا گیا`;
|
|
116
|
+
*
|
|
117
|
+
* @returns The wrapped text, or `''` when the input is not a string. Never
|
|
118
|
+
* throws.
|
|
119
|
+
*/
|
|
120
|
+
declare function wrapBidi(text: string, direction?: BidiDirection): string;
|
|
33
121
|
|
|
34
|
-
export { normalizeRomanUrdu, normalizeText, toEnglishDigits, toUrduDigits };
|
|
122
|
+
export { compareUrdu, isRTL, normalizeRomanUrdu, normalizeText, slugify, toEnglishDigits, toUrduDigits, wrapBidi };
|
|
123
|
+
export type { BidiDirection, SlugScript, SlugifyOptions };
|
package/dist/text.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { normalizeRomanUrdu, normalizeText, toEnglishDigits, toUrduDigits } from './chunk-
|
|
1
|
+
export { compareUrdu, isRTL, normalizeRomanUrdu, normalizeText, slugify, toEnglishDigits, toUrduDigits, wrapBidi } from './chunk-EA3SIHYT.js';
|
|
2
2
|
import './chunk-ENQ7O7VW.js';
|
package/dist/valibot.cjs
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-SQIHFEXI.cjs');
|
|
5
|
-
require('./chunk-AUQFA7EE.cjs');
|
|
6
|
-
require('./chunk-7E7L3NYS.cjs');
|
|
3
|
+
var chunkXCFZKCV2_cjs = require('./chunk-XCFZKCV2.cjs');
|
|
7
4
|
require('./chunk-ESKXG7Y6.cjs');
|
|
5
|
+
require('./chunk-YDUXIENX.cjs');
|
|
6
|
+
require('./chunk-H6M6L26S.cjs');
|
|
7
|
+
require('./chunk-SQIHFEXI.cjs');
|
|
8
|
+
require('./chunk-DHOP7LQX.cjs');
|
|
8
9
|
require('./chunk-MTS6SVNP.cjs');
|
|
10
|
+
require('./chunk-AUQFA7EE.cjs');
|
|
9
11
|
require('./chunk-YTLE5K7G.cjs');
|
|
10
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-7E7L3NYS.cjs');
|
|
13
|
+
require('./chunk-QFPEFD67.cjs');
|
|
14
|
+
require('./chunk-I7UUPD3G.cjs');
|
|
11
15
|
require('./chunk-HTCSHHOR.cjs');
|
|
12
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-33GOK7EE.cjs');
|
|
17
|
+
require('./chunk-E6GWBOKV.cjs');
|
|
13
18
|
require('./chunk-VPBMIYO2.cjs');
|
|
14
19
|
var v = require('valibot');
|
|
15
20
|
|
|
@@ -34,7 +39,7 @@ function _interopNamespace(e) {
|
|
|
34
39
|
var v__namespace = /*#__PURE__*/_interopNamespace(v);
|
|
35
40
|
|
|
36
41
|
function schema(name) {
|
|
37
|
-
const rule =
|
|
42
|
+
const rule = chunkXCFZKCV2_cjs.RULES[name];
|
|
38
43
|
return (options = {}) => v__namespace.pipe(v__namespace.string(), v__namespace.check(rule.test, options.message ?? rule.message));
|
|
39
44
|
}
|
|
40
45
|
var pk = {
|
|
@@ -45,7 +50,8 @@ var pk = {
|
|
|
45
50
|
strn: schema("strn"),
|
|
46
51
|
landline: schema("landline"),
|
|
47
52
|
passport: schema("passport"),
|
|
48
|
-
vehiclePlate: schema("vehiclePlate")
|
|
53
|
+
vehiclePlate: schema("vehiclePlate"),
|
|
54
|
+
codPhone: schema("codPhone")
|
|
49
55
|
};
|
|
50
56
|
|
|
51
57
|
exports.pk = pk;
|
package/dist/valibot.d.cts
CHANGED
|
@@ -19,6 +19,7 @@ declare const pk: {
|
|
|
19
19
|
landline: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
20
20
|
passport: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
21
21
|
vehiclePlate: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
22
|
+
codPhone: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export { AdapterOptions, pk };
|
package/dist/valibot.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare const pk: {
|
|
|
19
19
|
landline: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
20
20
|
passport: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
21
21
|
vehiclePlate: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
22
|
+
codPhone: (options?: AdapterOptions) => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, string>]>;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export { AdapterOptions, pk };
|
package/dist/valibot.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { RULES } from './chunk-
|
|
2
|
-
import './chunk-RZQJAZKC.js';
|
|
3
|
-
import './chunk-LQHM3ADX.js';
|
|
4
|
-
import './chunk-E6HSKRAE.js';
|
|
1
|
+
import { RULES } from './chunk-IDTRFOQW.js';
|
|
5
2
|
import './chunk-S274QFFB.js';
|
|
3
|
+
import './chunk-UYFTXD4P.js';
|
|
4
|
+
import './chunk-CEPNSHIC.js';
|
|
5
|
+
import './chunk-RZQJAZKC.js';
|
|
6
|
+
import './chunk-IBZPJS4H.js';
|
|
6
7
|
import './chunk-V2XE3NCG.js';
|
|
8
|
+
import './chunk-LQHM3ADX.js';
|
|
7
9
|
import './chunk-P7LVE2TF.js';
|
|
8
|
-
import './chunk-
|
|
10
|
+
import './chunk-E6HSKRAE.js';
|
|
11
|
+
import './chunk-B7DOQ5QF.js';
|
|
12
|
+
import './chunk-33QMFE2Z.js';
|
|
9
13
|
import './chunk-EEVNLTB4.js';
|
|
10
|
-
import './chunk-
|
|
14
|
+
import './chunk-XOTCIXY6.js';
|
|
15
|
+
import './chunk-E2XU6NOW.js';
|
|
11
16
|
import './chunk-ENQ7O7VW.js';
|
|
12
17
|
import * as v from 'valibot';
|
|
13
18
|
|
|
@@ -23,7 +28,8 @@ var pk = {
|
|
|
23
28
|
strn: schema("strn"),
|
|
24
29
|
landline: schema("landline"),
|
|
25
30
|
passport: schema("passport"),
|
|
26
|
-
vehiclePlate: schema("vehiclePlate")
|
|
31
|
+
vehiclePlate: schema("vehiclePlate"),
|
|
32
|
+
codPhone: schema("codPhone")
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
export { pk };
|
package/dist/yup.cjs
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-SQIHFEXI.cjs');
|
|
5
|
-
require('./chunk-AUQFA7EE.cjs');
|
|
6
|
-
require('./chunk-7E7L3NYS.cjs');
|
|
3
|
+
var chunkXCFZKCV2_cjs = require('./chunk-XCFZKCV2.cjs');
|
|
7
4
|
require('./chunk-ESKXG7Y6.cjs');
|
|
5
|
+
require('./chunk-YDUXIENX.cjs');
|
|
6
|
+
require('./chunk-H6M6L26S.cjs');
|
|
7
|
+
require('./chunk-SQIHFEXI.cjs');
|
|
8
|
+
require('./chunk-DHOP7LQX.cjs');
|
|
8
9
|
require('./chunk-MTS6SVNP.cjs');
|
|
10
|
+
require('./chunk-AUQFA7EE.cjs');
|
|
9
11
|
require('./chunk-YTLE5K7G.cjs');
|
|
10
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-7E7L3NYS.cjs');
|
|
13
|
+
require('./chunk-QFPEFD67.cjs');
|
|
14
|
+
require('./chunk-I7UUPD3G.cjs');
|
|
11
15
|
require('./chunk-HTCSHHOR.cjs');
|
|
12
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-33GOK7EE.cjs');
|
|
17
|
+
require('./chunk-E6GWBOKV.cjs');
|
|
13
18
|
require('./chunk-VPBMIYO2.cjs');
|
|
14
19
|
var yup = require('yup');
|
|
15
20
|
|
|
16
21
|
function schema(name) {
|
|
17
|
-
const rule =
|
|
22
|
+
const rule = chunkXCFZKCV2_cjs.RULES[name];
|
|
18
23
|
return (options = {}) => yup.string().test(
|
|
19
24
|
`pk-${name}`,
|
|
20
25
|
options.message ?? rule.message,
|
|
@@ -30,7 +35,8 @@ var pk = {
|
|
|
30
35
|
strn: schema("strn"),
|
|
31
36
|
landline: schema("landline"),
|
|
32
37
|
passport: schema("passport"),
|
|
33
|
-
vehiclePlate: schema("vehiclePlate")
|
|
38
|
+
vehiclePlate: schema("vehiclePlate"),
|
|
39
|
+
codPhone: schema("codPhone")
|
|
34
40
|
};
|
|
35
41
|
|
|
36
42
|
exports.pk = pk;
|
package/dist/yup.d.cts
CHANGED
|
@@ -19,6 +19,7 @@ declare const pk: {
|
|
|
19
19
|
landline: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
20
20
|
passport: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
21
21
|
vehiclePlate: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
22
|
+
codPhone: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export { AdapterOptions, pk };
|
package/dist/yup.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare const pk: {
|
|
|
19
19
|
landline: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
20
20
|
passport: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
21
21
|
vehiclePlate: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
22
|
+
codPhone: (options?: AdapterOptions) => yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export { AdapterOptions, pk };
|
package/dist/yup.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { RULES } from './chunk-
|
|
2
|
-
import './chunk-RZQJAZKC.js';
|
|
3
|
-
import './chunk-LQHM3ADX.js';
|
|
4
|
-
import './chunk-E6HSKRAE.js';
|
|
1
|
+
import { RULES } from './chunk-IDTRFOQW.js';
|
|
5
2
|
import './chunk-S274QFFB.js';
|
|
3
|
+
import './chunk-UYFTXD4P.js';
|
|
4
|
+
import './chunk-CEPNSHIC.js';
|
|
5
|
+
import './chunk-RZQJAZKC.js';
|
|
6
|
+
import './chunk-IBZPJS4H.js';
|
|
6
7
|
import './chunk-V2XE3NCG.js';
|
|
8
|
+
import './chunk-LQHM3ADX.js';
|
|
7
9
|
import './chunk-P7LVE2TF.js';
|
|
8
|
-
import './chunk-
|
|
10
|
+
import './chunk-E6HSKRAE.js';
|
|
11
|
+
import './chunk-B7DOQ5QF.js';
|
|
12
|
+
import './chunk-33QMFE2Z.js';
|
|
9
13
|
import './chunk-EEVNLTB4.js';
|
|
10
|
-
import './chunk-
|
|
14
|
+
import './chunk-XOTCIXY6.js';
|
|
15
|
+
import './chunk-E2XU6NOW.js';
|
|
11
16
|
import './chunk-ENQ7O7VW.js';
|
|
12
17
|
import { string } from 'yup';
|
|
13
18
|
|
|
@@ -28,7 +33,8 @@ var pk = {
|
|
|
28
33
|
strn: schema("strn"),
|
|
29
34
|
landline: schema("landline"),
|
|
30
35
|
passport: schema("passport"),
|
|
31
|
-
vehiclePlate: schema("vehiclePlate")
|
|
36
|
+
vehiclePlate: schema("vehiclePlate"),
|
|
37
|
+
codPhone: schema("codPhone")
|
|
32
38
|
};
|
|
33
39
|
|
|
34
40
|
export { pk };
|
package/dist/zod.cjs
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-SQIHFEXI.cjs');
|
|
5
|
-
require('./chunk-AUQFA7EE.cjs');
|
|
6
|
-
require('./chunk-7E7L3NYS.cjs');
|
|
3
|
+
var chunkXCFZKCV2_cjs = require('./chunk-XCFZKCV2.cjs');
|
|
7
4
|
require('./chunk-ESKXG7Y6.cjs');
|
|
5
|
+
require('./chunk-YDUXIENX.cjs');
|
|
6
|
+
require('./chunk-H6M6L26S.cjs');
|
|
7
|
+
require('./chunk-SQIHFEXI.cjs');
|
|
8
|
+
require('./chunk-DHOP7LQX.cjs');
|
|
8
9
|
require('./chunk-MTS6SVNP.cjs');
|
|
10
|
+
require('./chunk-AUQFA7EE.cjs');
|
|
9
11
|
require('./chunk-YTLE5K7G.cjs');
|
|
10
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-7E7L3NYS.cjs');
|
|
13
|
+
require('./chunk-QFPEFD67.cjs');
|
|
14
|
+
require('./chunk-I7UUPD3G.cjs');
|
|
11
15
|
require('./chunk-HTCSHHOR.cjs');
|
|
12
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-33GOK7EE.cjs');
|
|
17
|
+
require('./chunk-E6GWBOKV.cjs');
|
|
13
18
|
require('./chunk-VPBMIYO2.cjs');
|
|
14
19
|
var zod = require('zod');
|
|
15
20
|
|
|
16
21
|
function schema(name) {
|
|
17
|
-
const rule =
|
|
22
|
+
const rule = chunkXCFZKCV2_cjs.RULES[name];
|
|
18
23
|
return (options = {}) => zod.z.string().refine(rule.test, { message: options.message ?? rule.message });
|
|
19
24
|
}
|
|
20
25
|
var pk = {
|
|
@@ -25,7 +30,8 @@ var pk = {
|
|
|
25
30
|
strn: schema("strn"),
|
|
26
31
|
landline: schema("landline"),
|
|
27
32
|
passport: schema("passport"),
|
|
28
|
-
vehiclePlate: schema("vehiclePlate")
|
|
33
|
+
vehiclePlate: schema("vehiclePlate"),
|
|
34
|
+
codPhone: schema("codPhone")
|
|
29
35
|
};
|
|
30
36
|
|
|
31
37
|
exports.pk = pk;
|
package/dist/zod.d.cts
CHANGED
|
@@ -19,6 +19,7 @@ declare const pk: {
|
|
|
19
19
|
landline: (options?: AdapterOptions) => z.ZodString;
|
|
20
20
|
passport: (options?: AdapterOptions) => z.ZodString;
|
|
21
21
|
vehiclePlate: (options?: AdapterOptions) => z.ZodString;
|
|
22
|
+
codPhone: (options?: AdapterOptions) => z.ZodString;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export { AdapterOptions, pk };
|
package/dist/zod.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare const pk: {
|
|
|
19
19
|
landline: (options?: AdapterOptions) => z.ZodString;
|
|
20
20
|
passport: (options?: AdapterOptions) => z.ZodString;
|
|
21
21
|
vehiclePlate: (options?: AdapterOptions) => z.ZodString;
|
|
22
|
+
codPhone: (options?: AdapterOptions) => z.ZodString;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export { AdapterOptions, pk };
|
package/dist/zod.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { RULES } from './chunk-
|
|
2
|
-
import './chunk-RZQJAZKC.js';
|
|
3
|
-
import './chunk-LQHM3ADX.js';
|
|
4
|
-
import './chunk-E6HSKRAE.js';
|
|
1
|
+
import { RULES } from './chunk-IDTRFOQW.js';
|
|
5
2
|
import './chunk-S274QFFB.js';
|
|
3
|
+
import './chunk-UYFTXD4P.js';
|
|
4
|
+
import './chunk-CEPNSHIC.js';
|
|
5
|
+
import './chunk-RZQJAZKC.js';
|
|
6
|
+
import './chunk-IBZPJS4H.js';
|
|
6
7
|
import './chunk-V2XE3NCG.js';
|
|
8
|
+
import './chunk-LQHM3ADX.js';
|
|
7
9
|
import './chunk-P7LVE2TF.js';
|
|
8
|
-
import './chunk-
|
|
10
|
+
import './chunk-E6HSKRAE.js';
|
|
11
|
+
import './chunk-B7DOQ5QF.js';
|
|
12
|
+
import './chunk-33QMFE2Z.js';
|
|
9
13
|
import './chunk-EEVNLTB4.js';
|
|
10
|
-
import './chunk-
|
|
14
|
+
import './chunk-XOTCIXY6.js';
|
|
15
|
+
import './chunk-E2XU6NOW.js';
|
|
11
16
|
import './chunk-ENQ7O7VW.js';
|
|
12
17
|
import { z } from 'zod';
|
|
13
18
|
|
|
@@ -23,7 +28,8 @@ var pk = {
|
|
|
23
28
|
strn: schema("strn"),
|
|
24
29
|
landline: schema("landline"),
|
|
25
30
|
passport: schema("passport"),
|
|
26
|
-
vehiclePlate: schema("vehiclePlate")
|
|
31
|
+
vehiclePlate: schema("vehiclePlate"),
|
|
32
|
+
codPhone: schema("codPhone")
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
export { pk };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pakdatakit",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Pakistani data
|
|
3
|
+
"version": "2.5.1",
|
|
4
|
+
"description": "Pakistani data utilities for TypeScript and JavaScript: validate CNIC, mobile, IBAN, NTN/STRN, passport and vehicle numbers; Raast QR codes, banks, mobile networks, postal codes, districts, holidays, Hijri dates and amounts in words. No 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",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"bin": {
|
|
20
|
-
"pakdatakit": "
|
|
20
|
+
"pakdatakit": "dist/cli.js"
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
@@ -40,6 +40,16 @@
|
|
|
40
40
|
"default": "./dist/address.cjs"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
+
"./bills": {
|
|
44
|
+
"import": {
|
|
45
|
+
"types": "./dist/bills.d.ts",
|
|
46
|
+
"default": "./dist/bills.js"
|
|
47
|
+
},
|
|
48
|
+
"require": {
|
|
49
|
+
"types": "./dist/bills.d.cts",
|
|
50
|
+
"default": "./dist/bills.cjs"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
43
53
|
"./cnic": {
|
|
44
54
|
"import": {
|
|
45
55
|
"types": "./dist/cnic.d.ts",
|
|
@@ -50,6 +60,26 @@
|
|
|
50
60
|
"default": "./dist/cnic.cjs"
|
|
51
61
|
}
|
|
52
62
|
},
|
|
63
|
+
"./courier": {
|
|
64
|
+
"import": {
|
|
65
|
+
"types": "./dist/courier.d.ts",
|
|
66
|
+
"default": "./dist/courier.js"
|
|
67
|
+
},
|
|
68
|
+
"require": {
|
|
69
|
+
"types": "./dist/courier.d.cts",
|
|
70
|
+
"default": "./dist/courier.cjs"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"./fbr-invoice": {
|
|
74
|
+
"import": {
|
|
75
|
+
"types": "./dist/fbr-invoice.d.ts",
|
|
76
|
+
"default": "./dist/fbr-invoice.js"
|
|
77
|
+
},
|
|
78
|
+
"require": {
|
|
79
|
+
"types": "./dist/fbr-invoice.d.cts",
|
|
80
|
+
"default": "./dist/fbr-invoice.cjs"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
53
83
|
"./format": {
|
|
54
84
|
"import": {
|
|
55
85
|
"types": "./dist/format.d.ts",
|
|
@@ -100,6 +130,16 @@
|
|
|
100
130
|
"default": "./dist/iban.cjs"
|
|
101
131
|
}
|
|
102
132
|
},
|
|
133
|
+
"./incometax": {
|
|
134
|
+
"import": {
|
|
135
|
+
"types": "./dist/incometax.d.ts",
|
|
136
|
+
"default": "./dist/incometax.js"
|
|
137
|
+
},
|
|
138
|
+
"require": {
|
|
139
|
+
"types": "./dist/incometax.d.cts",
|
|
140
|
+
"default": "./dist/incometax.cjs"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
103
143
|
"./input": {
|
|
104
144
|
"import": {
|
|
105
145
|
"types": "./dist/input.d.ts",
|
|
@@ -160,6 +200,16 @@
|
|
|
160
200
|
"default": "./dist/postal.cjs"
|
|
161
201
|
}
|
|
162
202
|
},
|
|
203
|
+
"./quality": {
|
|
204
|
+
"import": {
|
|
205
|
+
"types": "./dist/quality.d.ts",
|
|
206
|
+
"default": "./dist/quality.js"
|
|
207
|
+
},
|
|
208
|
+
"require": {
|
|
209
|
+
"types": "./dist/quality.d.cts",
|
|
210
|
+
"default": "./dist/quality.cjs"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
163
213
|
"./raast": {
|
|
164
214
|
"import": {
|
|
165
215
|
"types": "./dist/raast.d.ts",
|
|
@@ -170,6 +220,16 @@
|
|
|
170
220
|
"default": "./dist/raast.cjs"
|
|
171
221
|
}
|
|
172
222
|
},
|
|
223
|
+
"./salestax": {
|
|
224
|
+
"import": {
|
|
225
|
+
"types": "./dist/salestax.d.ts",
|
|
226
|
+
"default": "./dist/salestax.js"
|
|
227
|
+
},
|
|
228
|
+
"require": {
|
|
229
|
+
"types": "./dist/salestax.d.cts",
|
|
230
|
+
"default": "./dist/salestax.cjs"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
173
233
|
"./tax": {
|
|
174
234
|
"import": {
|
|
175
235
|
"types": "./dist/tax.d.ts",
|
|
@@ -284,7 +344,8 @@
|
|
|
284
344
|
},
|
|
285
345
|
"files": [
|
|
286
346
|
"dist",
|
|
287
|
-
"DATA.md"
|
|
347
|
+
"DATA.md",
|
|
348
|
+
"NOTICE"
|
|
288
349
|
],
|
|
289
350
|
"sideEffects": false,
|
|
290
351
|
"scripts": {
|
|
@@ -298,6 +359,8 @@
|
|
|
298
359
|
"format": "prettier --write .",
|
|
299
360
|
"format:check": "prettier --check .",
|
|
300
361
|
"size": "node scripts/check-size.mjs",
|
|
362
|
+
"check:metadata": "node scripts/check-metadata.mjs",
|
|
363
|
+
"test:ports": "node scripts/test-ports.mjs",
|
|
301
364
|
"typecheck": "tsc --noEmit",
|
|
302
365
|
"prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build",
|
|
303
366
|
"docs": "typedoc && node scripts/generate-llms.mjs"
|
|
@@ -363,7 +426,7 @@
|
|
|
363
426
|
"license": "MIT",
|
|
364
427
|
"repository": {
|
|
365
428
|
"type": "git",
|
|
366
|
-
"url": "https://github.com/chmuzamil/pakdatakit.git"
|
|
429
|
+
"url": "git+https://github.com/chmuzamil/pakdatakit.git"
|
|
367
430
|
},
|
|
368
431
|
"engines": {
|
|
369
432
|
"node": ">=20"
|
|
@@ -371,21 +434,21 @@
|
|
|
371
434
|
"devDependencies": {
|
|
372
435
|
"@eslint/js": "^10.0.1",
|
|
373
436
|
"@types/node": "^26.6.5",
|
|
374
|
-
"@typescript-eslint/eslint-plugin": "^8.72.
|
|
437
|
+
"@typescript-eslint/eslint-plugin": "^8.72.2",
|
|
375
438
|
"@typescript-eslint/parser": "^8.72.0",
|
|
376
439
|
"class-validator": "^0.15.1",
|
|
377
|
-
"eslint": "^10.
|
|
440
|
+
"eslint": "^10.15.0",
|
|
378
441
|
"eslint-config-prettier": "^10.1.5",
|
|
379
|
-
"globals": "^17.
|
|
442
|
+
"globals": "^17.14.0",
|
|
380
443
|
"joi": "^18.3.2",
|
|
381
|
-
"libphonenumber-js": "^1.13.
|
|
382
|
-
"prettier": "^3.
|
|
444
|
+
"libphonenumber-js": "^1.13.16",
|
|
445
|
+
"prettier": "^3.10.1",
|
|
383
446
|
"superstruct": "^2.0.2",
|
|
384
447
|
"tsup": "^9.0.0",
|
|
385
448
|
"typedoc": "^0.28.20",
|
|
386
449
|
"typescript": "^5.8.3",
|
|
387
450
|
"valibot": "^1.5.0",
|
|
388
|
-
"vitest": "^5.0
|
|
451
|
+
"vitest": "^5.1.0",
|
|
389
452
|
"yup": "^1.7.1",
|
|
390
453
|
"zod": "^4.6.7"
|
|
391
454
|
},
|