ivl 0.3.0 → 0.3.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/lib/helpers/index.d.ts +2 -10
- package/lib/helpers/index.js +1 -1
- package/package.json +1 -1
package/lib/helpers/index.d.ts
CHANGED
|
@@ -15,15 +15,7 @@ export declare const stringBetween: (max?: number, min?: number) => RULE_SYNC;
|
|
|
15
15
|
export declare const numberBetween: (max?: number, min?: number) => RULE_SYNC;
|
|
16
16
|
export declare const acceptAnyAsync: (rules?: RULE[]) => RULE;
|
|
17
17
|
export declare const acceptAnySync: (rules?: RULE_SYNC[]) => RULE_SYNC;
|
|
18
|
-
declare const allowUndefined: (rules: RULES) => {};
|
|
19
|
-
declare const preprocess: (fn: Function, rules: RULES) => {};
|
|
20
|
-
|
|
21
|
-
declare namespace ruleSet {
|
|
22
|
-
export { allowUndefined, preprocess };
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
ruleSet,
|
|
27
|
-
};
|
|
18
|
+
export declare const allowUndefined: (rules: RULES) => {};
|
|
19
|
+
export declare const preprocess: (fn: Function, rules: RULES) => {};
|
|
28
20
|
|
|
29
21
|
export {};
|
package/lib/helpers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u=(n)=>typeof n==="string"||n!==null&&typeof n==="object"&&("length"in n)&&typeof n.length==="number",c=(n)=>(e)=>typeof e===n,i=(n)=>(e)=>typeof e==="string"&&n.test(e),m=(n=1/0)=>(e)=>typeof e==="number"&&e<=n,y=(n=-1/0)=>(e)=>typeof e==="number"&&e>=n,f=(n=1/0)=>(e)=>u(e)&&e.length<=n,w=(n=0)=>(e)=>u(e)&&e.length>=n,a=(n=1/0,e=0)=>(t)=>typeof t==="string"&&t.length>=e&&t.length<=n,L=(n=1/0,e=-1/0)=>(t)=>typeof t==="number"&&t>=e&&t<=n,g=(n=[])=>async(e,...t)=>(await Promise.all(n.map((o)=>o(e,...t)))).some((o)=>o),h=(n=[])=>(e,...t)=>n.map((o)=>o(e,...t)).some((o)=>o);var l=(n)=>Object.entries(n).reduce((e,[t,o])=>({...e,[t]:(r,...s)=>typeof r==="undefined"?!0:o(r,...s)}),{}),x=(n,e)=>Object.entries(e).reduce((t,[o,r])=>({...t,[o]:(s,...p)=>r(n(s),...p)}),{});export{a as stringBetween,x as preprocess,L as numberBetween,w as minLength,y as min,f as maxLength,m as max,i as matchesRegex,c as isType,l as allowUndefined,h as acceptAnySync,g as acceptAnyAsync};
|