ivl 0.2.5 → 0.2.6

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/README.md CHANGED
@@ -23,20 +23,15 @@ console.log(getInputErrors(30, my_rules)) // ["Input must be more than 40"]
23
23
 
24
24
  ```
25
25
  # Installing
26
- ### Bun.js
27
26
  ```typescript
28
- bun add ivl
27
+ bun add ivl // bun.js
28
+ yarn add ivl // yarn
29
+ npm install ivl // npm
30
+ pnpm install ivl // pnpm
29
31
  ```
30
32
 
31
- ### yarn
32
- ```typescript
33
- yarn add ivl
34
- ```
33
+ *deno coming soon*
35
34
 
36
- ### npm
37
- ```typescript
38
- npm install ivl
39
- ```
40
35
  ---
41
36
  # Usage examples
42
37
  ## Frontend example
@@ -1 +1 @@
1
- var s=(n)=>n!==null&&typeof n==="object"&&("length"in n)&&typeof n.length==="number",p=(n)=>(e)=>typeof e===n,i=(n)=>(e)=>typeof e==="string"&&n.test(e),m=(n=1/0)=>(e)=>typeof e==="number"&&e<=n,f=(n=-1/0)=>(e)=>typeof e==="number"&&e>=n,w=(n=1/0)=>(e)=>s(e)&&e.length<=n,y=(n=1/0)=>(e)=>s(e)&&e.length>=n,a=(n=100,e=0)=>(t)=>typeof t==="string"&&t.length>=e&&t.length<n,L=(n=100,e=1)=>(t)=>typeof t==="number"&&t>=e&&t<n,h=(n=[])=>async(e,...t)=>(await Promise.all(n.map((o)=>o(void 0,e,...t)))).some((o)=>o),R=(n=[])=>(e,...t)=>n.map((o)=>o(void 0,e,...t)).some((o)=>o);var g=(n)=>Object.entries(n).reduce((e,[t,o])=>({...e,[t]:(r,...u)=>typeof r==="undefined"?!0:o(r,...u)}),{}),l=(n,e)=>Object.entries(e).reduce((t,[o,r])=>({...t,[o]:(u,...c)=>r(n(u),...c)}),{});export{a as stringBetween,l as preprocess,L as numberBetween,y as minLength,f as min,w as maxLength,m as max,i as matchesRegex,p as isType,g as allowUndefined,R as acceptAnySync,h as acceptAny};
1
+ var s=(n)=>typeof n==="string"||n!==null&&typeof n==="object"&&("length"in n)&&typeof n.length==="number",i=(n)=>(e)=>typeof e===n,p=(n)=>(e)=>typeof e==="string"&&n.test(e),f=(n=1/0)=>(e)=>typeof e==="number"&&e<=n,m=(n=-1/0)=>(e)=>typeof e==="number"&&e>=n,w=(n=1/0)=>(e)=>s(e)&&e.length<=n,y=(n=0)=>(e)=>s(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(void 0,e,...t)))).some((o)=>o),h=(n=[])=>(e,...t)=>n.map((o)=>o(void 0,e,...t)).some((o)=>o);var l=(n)=>Object.entries(n).reduce((e,[t,o])=>({...e,[t]:(r,...u)=>typeof r==="undefined"?!0:o(r,...u)}),{}),x=(n,e)=>Object.entries(e).reduce((t,[o,r])=>({...t,[o]:(u,...c)=>r(n(u),...c)}),{});export{a as stringBetween,x as preprocess,L as numberBetween,y as minLength,m as min,w as maxLength,f as max,p as matchesRegex,i as isType,l as allowUndefined,h as acceptAnySync,g as acceptAny};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ivl",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "author": {
5
5
  "name": "Oskar Voorel",
6
6
  "email": "oskar@voorel.com"