ivl 0.1.0
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 +8 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.js +1 -0
- package/package.json +37 -0
package/README.md
ADDED
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v8.1.1
|
|
2
|
+
|
|
3
|
+
export type RULE = (value: unknown, ...overload: unknown[]) => boolean | Promise<boolean>;
|
|
4
|
+
export type RULES = {
|
|
5
|
+
[index: string]: RULE;
|
|
6
|
+
};
|
|
7
|
+
export type CHECKABLE_OBJECT = {
|
|
8
|
+
[index: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
export type SCHEMA = {
|
|
11
|
+
[index: string]: RULES;
|
|
12
|
+
};
|
|
13
|
+
export type CHECKED_SCHEMA = Promise<{
|
|
14
|
+
[index: string]: string[];
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
export {};
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var P=Object.create;var{defineProperty:R,getPrototypeOf:T,getOwnPropertyNames:f}=Object;var B=Object.prototype.hasOwnProperty;var A=(C,E,x)=>{for(let n of f(E))if(!B.call(C,n)&&n!=="default")R(C,n,{get:()=>E[n],enumerable:!0});if(x){for(let n of f(E))if(!B.call(x,n)&&n!=="default")R(x,n,{get:()=>E[n],enumerable:!0});return x}},M=(C,E,x)=>{x=C!=null?P(T(C)):{};const n=E||!C||!C.__esModule?R(x,"default",{value:C,enumerable:!0}):x;for(let p of f(C))if(!B.call(n,p))R(n,p,{get:()=>C[p],enumerable:!0});return n};var _=(C,E)=>()=>(E||C((E={exports:{}}).exports,E),E.exports);var d=(C,E)=>{for(var x in E)R(C,x,{get:E[x],enumerable:!0,configurable:!0,set:(n)=>E[x]=()=>n})};var K=_((J)=>{var D=async(C,E,...x)=>{const n={};return Object.entries(E).forEach(([p,H])=>{n[p]=Promise.resolve().then(()=>H(C,...x)).then((L)=>n[p]=L).catch(()=>{n[p]=!1})}),await Promise.allSettled(Object.values(n)),Object.entries(n).reduce((p,[H,L])=>L?p:[...p,H],[])},w=async(C,E,x=!1,...n)=>{const p={};if(Object.entries(E).forEach(([H,L])=>{p[H]=D(C[H],L,...n).then((S)=>{p[H]=S}).catch((S)=>{p[H]=S})}),x){const H=Object.keys(C),L=new Set(Object.keys(E));H.filter((U)=>!L.has(U)).forEach((U)=>{p[U]=["Key not allowed"]})}return await Promise.allSettled(Object.values(p)),p};J={getValueErrors:D,getSchemaErrors:w}});var i={};d(i,{ivl:()=>O,default:()=>q});var O=M(K(),1);A(i,M(K(),1));var g={};var q=O;export{O as ivl,q as default};
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ivl",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "lib/index.js",
|
|
5
|
+
"types": "lib/index.d.ts",
|
|
6
|
+
"description": "Lightweight input validation",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Oskar Voorel",
|
|
9
|
+
"email": "oskar@voorel.com"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "bun run build.mjs",
|
|
13
|
+
"prepublishOnly": "bun run build"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"lib"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"validation",
|
|
20
|
+
"typescript",
|
|
21
|
+
"schema",
|
|
22
|
+
"input"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./lib/index.d.ts",
|
|
27
|
+
"default": "./lib/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": "false",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/bun": "^1.0.0",
|
|
34
|
+
"bun-plugin-dts": "^0.2.1",
|
|
35
|
+
"typescript": "^5.2.2"
|
|
36
|
+
}
|
|
37
|
+
}
|