n4s 4.1.8 → 4.1.9-dev-c786f7
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/dist/cjs/compose.development.js +5 -58
- package/dist/cjs/compose.production.js +1 -1
- package/dist/cjs/compounds.development.js +8 -51
- package/dist/cjs/compounds.production.js +1 -1
- package/dist/cjs/n4s.development.js +66 -211
- package/dist/cjs/n4s.production.js +1 -1
- package/dist/cjs/schema.development.js +5 -57
- package/dist/cjs/schema.production.js +1 -1
- package/dist/es/compose.development.js +1 -54
- package/dist/es/compose.production.js +1 -1
- package/dist/es/compounds.development.js +2 -45
- package/dist/es/compounds.production.js +1 -1
- package/dist/es/n4s.development.js +4 -149
- package/dist/es/n4s.production.js +1 -1
- package/dist/es/schema.development.js +1 -53
- package/dist/es/schema.production.js +1 -1
- package/dist/umd/compose.development.js +7 -7
- package/dist/umd/compose.production.js +1 -1
- package/dist/umd/compounds.development.js +26 -26
- package/dist/umd/compounds.production.js +1 -1
- package/dist/umd/n4s.development.js +117 -117
- package/dist/umd/n4s.production.js +1 -1
- package/dist/umd/schema.development.js +34 -34
- package/package.json +3 -2
- package/types/compose.d.ts +15 -31
- package/types/compounds.d.ts +15 -31
- package/types/n4s.d.ts +15 -31
- package/types/schema.d.ts +15 -31
package/types/n4s.d.ts
CHANGED
|
@@ -37,36 +37,20 @@ type KBaseRules = keyof BaseRules;
|
|
|
37
37
|
declare function condition(value: any, callback: (value: any) => RuleReturn): RuleReturn;
|
|
38
38
|
declare function endsWith(value: string, arg1: string): boolean;
|
|
39
39
|
declare function equals(value: unknown, arg1: unknown): boolean;
|
|
40
|
-
declare function greaterThan(value: number | string, gt: number | string): boolean;
|
|
41
40
|
declare function greaterThanOrEquals(value: string | number, gte: string | number): boolean;
|
|
42
41
|
declare function inside(value: unknown, arg1: string | unknown[]): boolean;
|
|
43
|
-
// The module is named "isArrayValue" since it
|
|
44
|
-
// is conflicting with a nested npm dependency.
|
|
45
|
-
// We may need to revisit this in the future.
|
|
46
|
-
declare function isArray(value: unknown): value is Array<unknown>;
|
|
47
42
|
declare function isBetween(value: number | string, min: number | string, max: number | string): boolean;
|
|
48
43
|
declare function isBlank(value: unknown): boolean;
|
|
49
|
-
declare function isBoolean(value: unknown): value is boolean;
|
|
50
|
-
declare function isEmpty(value: unknown): boolean;
|
|
51
44
|
declare function isKeyOf(key: string | symbol | number, obj: any): boolean;
|
|
52
45
|
declare function isNaN(value: unknown): boolean;
|
|
53
46
|
declare function isNegative(value: number | string): boolean;
|
|
54
|
-
declare function isNull(value: unknown): value is null;
|
|
55
|
-
declare function isNullish(value: any): value is null | undefined;
|
|
56
47
|
declare function isNumber(value: unknown): value is number;
|
|
57
|
-
declare function isNumeric(value: string | number): boolean;
|
|
58
|
-
declare function isPositive(value: number | string): boolean;
|
|
59
|
-
declare function isStringValue(v: unknown): v is string;
|
|
60
48
|
declare function isTruthy(value: unknown): boolean;
|
|
61
|
-
declare function isUndefined(value?: unknown): value is undefined;
|
|
62
49
|
declare function isValueOf(value: any, objectToCheck: any): boolean;
|
|
63
|
-
declare function lengthEquals(value: string | unknown[], arg1: string | number): boolean;
|
|
64
50
|
declare function lessThan(value: string | number, lt: string | number): boolean;
|
|
65
51
|
declare function lessThanOrEquals(value: string | number, lte: string | number): boolean;
|
|
66
|
-
declare function longerThan(value: string | unknown[], arg1: string | number): boolean;
|
|
67
52
|
declare function longerThanOrEquals(value: string | unknown[], arg1: string | number): boolean;
|
|
68
53
|
declare function matches(value: string, regex: RegExp | string): boolean;
|
|
69
|
-
declare function numberEquals(value: string | number, eq: string | number): boolean;
|
|
70
54
|
declare function shorterThan(value: string | unknown[], arg1: string | number): boolean;
|
|
71
55
|
declare function shorterThanOrEquals(value: string | unknown[], arg1: string | number): boolean;
|
|
72
56
|
declare function startsWith(value: string, arg1: string): boolean;
|
|
@@ -76,16 +60,16 @@ declare const baseRules: {
|
|
|
76
60
|
doesNotStartWith: (value: string, arg1: string) => boolean;
|
|
77
61
|
endsWith: typeof endsWith;
|
|
78
62
|
equals: typeof equals;
|
|
79
|
-
greaterThan: typeof greaterThan;
|
|
63
|
+
greaterThan: typeof import("packages/vest-utils/types/vest-utils").greaterThan;
|
|
80
64
|
greaterThanOrEquals: typeof greaterThanOrEquals;
|
|
81
|
-
gt: typeof greaterThan;
|
|
65
|
+
gt: typeof import("packages/vest-utils/types/vest-utils").greaterThan;
|
|
82
66
|
gte: typeof greaterThanOrEquals;
|
|
83
67
|
inside: typeof inside;
|
|
84
|
-
isArray: typeof isArray;
|
|
68
|
+
isArray: typeof import("packages/vest-utils/types/vest-utils").isArray;
|
|
85
69
|
isBetween: typeof isBetween;
|
|
86
70
|
isBlank: typeof isBlank;
|
|
87
|
-
isBoolean: typeof isBoolean;
|
|
88
|
-
isEmpty: typeof isEmpty;
|
|
71
|
+
isBoolean: typeof import("packages/vest-utils/types/vest-utils").isBoolean;
|
|
72
|
+
isEmpty: typeof import("packages/vest-utils/types/vest-utils").isEmpty;
|
|
89
73
|
isEven: (value: any) => boolean;
|
|
90
74
|
isFalsy: (value: unknown) => boolean;
|
|
91
75
|
isKeyOf: typeof isKeyOf;
|
|
@@ -105,21 +89,21 @@ declare const baseRules: {
|
|
|
105
89
|
isNotString: (v: unknown) => boolean;
|
|
106
90
|
isNotUndefined: (value?: unknown) => boolean;
|
|
107
91
|
isNotValueOf: (value: any, objectToCheck: any) => boolean;
|
|
108
|
-
isNull: typeof isNull;
|
|
109
|
-
isNullish: typeof isNullish;
|
|
92
|
+
isNull: typeof import("packages/vest-utils/types/vest-utils").isNull;
|
|
93
|
+
isNullish: typeof import("packages/vest-utils/types/vest-utils").isNullish;
|
|
110
94
|
isNumber: typeof isNumber;
|
|
111
|
-
isNumeric: typeof isNumeric;
|
|
95
|
+
isNumeric: typeof import("packages/vest-utils/types/vest-utils").isNumeric;
|
|
112
96
|
isOdd: (value: any) => boolean;
|
|
113
|
-
isPositive: typeof isPositive;
|
|
114
|
-
isString: typeof isStringValue;
|
|
97
|
+
isPositive: typeof import("packages/vest-utils/types/vest-utils").isPositive;
|
|
98
|
+
isString: typeof import("packages/vest-utils/types/vest-utils").isStringValue;
|
|
115
99
|
isTruthy: typeof isTruthy;
|
|
116
|
-
isUndefined: typeof isUndefined;
|
|
100
|
+
isUndefined: typeof import("packages/vest-utils/types/vest-utils").isUndefined;
|
|
117
101
|
isValueOf: typeof isValueOf;
|
|
118
|
-
lengthEquals: typeof lengthEquals;
|
|
102
|
+
lengthEquals: typeof import("packages/vest-utils/types/vest-utils").lengthEquals;
|
|
119
103
|
lengthNotEquals: (value: string | unknown[], arg1: string | number) => boolean;
|
|
120
104
|
lessThan: typeof lessThan;
|
|
121
105
|
lessThanOrEquals: typeof lessThanOrEquals;
|
|
122
|
-
longerThan: typeof longerThan;
|
|
106
|
+
longerThan: typeof import("packages/vest-utils/types/vest-utils").longerThan;
|
|
123
107
|
longerThanOrEquals: typeof longerThanOrEquals;
|
|
124
108
|
lt: typeof lessThan;
|
|
125
109
|
lte: typeof lessThanOrEquals;
|
|
@@ -127,13 +111,13 @@ declare const baseRules: {
|
|
|
127
111
|
notEquals: (value: unknown, arg1: unknown) => boolean;
|
|
128
112
|
notInside: (value: unknown, arg1: string | unknown[]) => boolean;
|
|
129
113
|
notMatches: (value: string, regex: string | RegExp) => boolean;
|
|
130
|
-
numberEquals: typeof numberEquals;
|
|
114
|
+
numberEquals: typeof import("packages/vest-utils/types/vest-utils").numberEquals;
|
|
131
115
|
numberNotEquals: (value: string | number, eq: string | number) => boolean;
|
|
132
116
|
shorterThan: typeof shorterThan;
|
|
133
117
|
shorterThanOrEquals: typeof shorterThanOrEquals;
|
|
134
118
|
startsWith: typeof startsWith;
|
|
135
119
|
};
|
|
136
|
-
type Rules<E =
|
|
120
|
+
type Rules<E> = n4s.EnforceCustomMatchers<Rules<E> & E> & Record<string, (...args: Args) => Rules<E> & E> & {
|
|
137
121
|
[P in KBaseRules]: (...args: DropFirst<Parameters<BaseRules[P]>> | Args) => Rules<E> & E;
|
|
138
122
|
};
|
|
139
123
|
/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/no-empty-interface */
|
package/types/schema.d.ts
CHANGED
|
@@ -17,36 +17,20 @@ type KBaseRules = keyof BaseRules;
|
|
|
17
17
|
declare function condition(value: any, callback: (value: any) => RuleReturn): RuleReturn;
|
|
18
18
|
declare function endsWith(value: string, arg1: string): boolean;
|
|
19
19
|
declare function equals(value: unknown, arg1: unknown): boolean;
|
|
20
|
-
declare function greaterThan(value: number | string, gt: number | string): boolean;
|
|
21
20
|
declare function greaterThanOrEquals(value: string | number, gte: string | number): boolean;
|
|
22
21
|
declare function inside(value: unknown, arg1: string | unknown[]): boolean;
|
|
23
|
-
// The module is named "isArrayValue" since it
|
|
24
|
-
// is conflicting with a nested npm dependency.
|
|
25
|
-
// We may need to revisit this in the future.
|
|
26
|
-
declare function isArray(value: unknown): value is Array<unknown>;
|
|
27
22
|
declare function isBetween(value: number | string, min: number | string, max: number | string): boolean;
|
|
28
23
|
declare function isBlank(value: unknown): boolean;
|
|
29
|
-
declare function isBoolean(value: unknown): value is boolean;
|
|
30
|
-
declare function isEmpty(value: unknown): boolean;
|
|
31
24
|
declare function isKeyOf(key: string | symbol | number, obj: any): boolean;
|
|
32
25
|
declare function isNaN(value: unknown): boolean;
|
|
33
26
|
declare function isNegative(value: number | string): boolean;
|
|
34
|
-
declare function isNull(value: unknown): value is null;
|
|
35
|
-
declare function isNullish(value: any): value is null | undefined;
|
|
36
27
|
declare function isNumber(value: unknown): value is number;
|
|
37
|
-
declare function isNumeric(value: string | number): boolean;
|
|
38
|
-
declare function isPositive(value: number | string): boolean;
|
|
39
|
-
declare function isStringValue(v: unknown): v is string;
|
|
40
28
|
declare function isTruthy(value: unknown): boolean;
|
|
41
|
-
declare function isUndefined(value?: unknown): value is undefined;
|
|
42
29
|
declare function isValueOf(value: any, objectToCheck: any): boolean;
|
|
43
|
-
declare function lengthEquals(value: string | unknown[], arg1: string | number): boolean;
|
|
44
30
|
declare function lessThan(value: string | number, lt: string | number): boolean;
|
|
45
31
|
declare function lessThanOrEquals(value: string | number, lte: string | number): boolean;
|
|
46
|
-
declare function longerThan(value: string | unknown[], arg1: string | number): boolean;
|
|
47
32
|
declare function longerThanOrEquals(value: string | unknown[], arg1: string | number): boolean;
|
|
48
33
|
declare function matches(value: string, regex: RegExp | string): boolean;
|
|
49
|
-
declare function numberEquals(value: string | number, eq: string | number): boolean;
|
|
50
34
|
declare function shorterThan(value: string | unknown[], arg1: string | number): boolean;
|
|
51
35
|
declare function shorterThanOrEquals(value: string | unknown[], arg1: string | number): boolean;
|
|
52
36
|
declare function startsWith(value: string, arg1: string): boolean;
|
|
@@ -56,16 +40,16 @@ declare const baseRules: {
|
|
|
56
40
|
doesNotStartWith: (value: string, arg1: string) => boolean;
|
|
57
41
|
endsWith: typeof endsWith;
|
|
58
42
|
equals: typeof equals;
|
|
59
|
-
greaterThan: typeof greaterThan;
|
|
43
|
+
greaterThan: typeof import("packages/vest-utils/types/vest-utils").greaterThan;
|
|
60
44
|
greaterThanOrEquals: typeof greaterThanOrEquals;
|
|
61
|
-
gt: typeof greaterThan;
|
|
45
|
+
gt: typeof import("packages/vest-utils/types/vest-utils").greaterThan;
|
|
62
46
|
gte: typeof greaterThanOrEquals;
|
|
63
47
|
inside: typeof inside;
|
|
64
|
-
isArray: typeof isArray;
|
|
48
|
+
isArray: typeof import("packages/vest-utils/types/vest-utils").isArray;
|
|
65
49
|
isBetween: typeof isBetween;
|
|
66
50
|
isBlank: typeof isBlank;
|
|
67
|
-
isBoolean: typeof isBoolean;
|
|
68
|
-
isEmpty: typeof isEmpty;
|
|
51
|
+
isBoolean: typeof import("packages/vest-utils/types/vest-utils").isBoolean;
|
|
52
|
+
isEmpty: typeof import("packages/vest-utils/types/vest-utils").isEmpty;
|
|
69
53
|
isEven: (value: any) => boolean;
|
|
70
54
|
isFalsy: (value: unknown) => boolean;
|
|
71
55
|
isKeyOf: typeof isKeyOf;
|
|
@@ -85,21 +69,21 @@ declare const baseRules: {
|
|
|
85
69
|
isNotString: (v: unknown) => boolean;
|
|
86
70
|
isNotUndefined: (value?: unknown) => boolean;
|
|
87
71
|
isNotValueOf: (value: any, objectToCheck: any) => boolean;
|
|
88
|
-
isNull: typeof isNull;
|
|
89
|
-
isNullish: typeof isNullish;
|
|
72
|
+
isNull: typeof import("packages/vest-utils/types/vest-utils").isNull;
|
|
73
|
+
isNullish: typeof import("packages/vest-utils/types/vest-utils").isNullish;
|
|
90
74
|
isNumber: typeof isNumber;
|
|
91
|
-
isNumeric: typeof isNumeric;
|
|
75
|
+
isNumeric: typeof import("packages/vest-utils/types/vest-utils").isNumeric;
|
|
92
76
|
isOdd: (value: any) => boolean;
|
|
93
|
-
isPositive: typeof isPositive;
|
|
94
|
-
isString: typeof isStringValue;
|
|
77
|
+
isPositive: typeof import("packages/vest-utils/types/vest-utils").isPositive;
|
|
78
|
+
isString: typeof import("packages/vest-utils/types/vest-utils").isStringValue;
|
|
95
79
|
isTruthy: typeof isTruthy;
|
|
96
|
-
isUndefined: typeof isUndefined;
|
|
80
|
+
isUndefined: typeof import("packages/vest-utils/types/vest-utils").isUndefined;
|
|
97
81
|
isValueOf: typeof isValueOf;
|
|
98
|
-
lengthEquals: typeof lengthEquals;
|
|
82
|
+
lengthEquals: typeof import("packages/vest-utils/types/vest-utils").lengthEquals;
|
|
99
83
|
lengthNotEquals: (value: string | unknown[], arg1: string | number) => boolean;
|
|
100
84
|
lessThan: typeof lessThan;
|
|
101
85
|
lessThanOrEquals: typeof lessThanOrEquals;
|
|
102
|
-
longerThan: typeof longerThan;
|
|
86
|
+
longerThan: typeof import("packages/vest-utils/types/vest-utils").longerThan;
|
|
103
87
|
longerThanOrEquals: typeof longerThanOrEquals;
|
|
104
88
|
lt: typeof lessThan;
|
|
105
89
|
lte: typeof lessThanOrEquals;
|
|
@@ -107,13 +91,13 @@ declare const baseRules: {
|
|
|
107
91
|
notEquals: (value: unknown, arg1: unknown) => boolean;
|
|
108
92
|
notInside: (value: unknown, arg1: string | unknown[]) => boolean;
|
|
109
93
|
notMatches: (value: string, regex: string | RegExp) => boolean;
|
|
110
|
-
numberEquals: typeof numberEquals;
|
|
94
|
+
numberEquals: typeof import("packages/vest-utils/types/vest-utils").numberEquals;
|
|
111
95
|
numberNotEquals: (value: string | number, eq: string | number) => boolean;
|
|
112
96
|
shorterThan: typeof shorterThan;
|
|
113
97
|
shorterThanOrEquals: typeof shorterThanOrEquals;
|
|
114
98
|
startsWith: typeof startsWith;
|
|
115
99
|
};
|
|
116
|
-
type Rules<E =
|
|
100
|
+
type Rules<E> = n4s.EnforceCustomMatchers<Rules<E> & E> & Record<string, (...args: Args) => Rules<E> & E> & {
|
|
117
101
|
[P in KBaseRules]: (...args: DropFirst<Parameters<BaseRules[P]>> | Args) => Rules<E> & E;
|
|
118
102
|
};
|
|
119
103
|
/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/no-empty-interface */
|