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 +5 -10
- package/lib/helpers/index.js +1 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
package/lib/helpers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var s=(n)=>n!==null&&typeof n==="object"&&("length"in n)&&typeof n.length==="number",
|
|
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};
|