bguard 0.0.6 → 0.0.8

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.
Files changed (2) hide show
  1. package/README.md +5 -5
  2. package/package.json +12 -12
package/README.md CHANGED
@@ -32,9 +32,9 @@ Let's define a schema for a Student object:
32
32
  ```typeScript
33
33
 
34
34
  import { parseSchema, InferType, string, number, array, object, boolean } from 'bguard';
35
- import { email } from 'bguard/asserts/string/email';
36
- import { min } from 'bguard/asserts/number/min';
37
- import { max } from 'bguard/asserts/number/max';
35
+ import { email } from 'bguard/string/email';
36
+ import { min } from 'bguard/number/min';
37
+ import { max } from 'bguard/number/max';
38
38
 
39
39
  // Example: Student Schema
40
40
  const studentSchema = object({
@@ -137,8 +137,8 @@ const schema = string().nullable().optional();
137
137
  You can extend the validation with custom assertions:
138
138
 
139
139
  ```typeScript
140
- import { min } from 'bguard/asserts/number/min';
141
- import { max } from 'bguard/asserts/number/max';
140
+ import { min } from 'bguard/number/min';
141
+ import { max } from 'bguard/number/max';
142
142
 
143
143
  const ageSchema = number().custom(min(18), max(120));
144
144
  ```
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "bguard",
3
3
  "private": false,
4
4
  "license": "MIT",
5
- "version": "0.0.6",
5
+ "version": "0.0.8",
6
6
  "main": "lib/index.js",
7
7
  "module": "lib/index.mjs",
8
8
  "types": "lib/index.d.ts",
@@ -98,32 +98,32 @@
98
98
  "types": "./lib/index.d.ts"
99
99
  },
100
100
  "./string/*": {
101
- "import": "./lib/asserts/string/*.js",
101
+ "import": "./lib/asserts/string/*.mjs",
102
102
  "require": "./lib/asserts/string/*.js",
103
- "types": "./lib/asserts/common/*.d.ts"
103
+ "types": "./lib/asserts/string/*.d.ts"
104
104
  },
105
105
  "./boolean/*": {
106
- "import": "./lib/asserts/boolean/*.js",
106
+ "import": "./lib/asserts/boolean/*.mjs",
107
107
  "require": "./lib/asserts/boolean/*.js",
108
- "types": "./lib/index.d.ts"
108
+ "types": "./lib/asserts/boolean/*.d.ts"
109
109
  },
110
110
  "./number/*": {
111
- "import": "./lib/asserts/number/*.js",
111
+ "import": "./lib/asserts/number/*.mjs",
112
112
  "require": "./lib/asserts/number/*.js",
113
- "types": "./lib/asserts/common/*.d.ts"
113
+ "types": "./lib/asserts/number/*.d.ts"
114
114
  },
115
115
  "./array/*": {
116
- "import": "./lib/asserts/array/*.js",
116
+ "import": "./lib/asserts/array/*.mjs",
117
117
  "require": "./lib/asserts/array/*.js",
118
- "types": "./lib/asserts/common/*.d.ts"
118
+ "types": "./lib/asserts/array/*.d.ts"
119
119
  },
120
120
  "./object/*": {
121
- "import": "./lib/asserts/object/*.js",
121
+ "import": "./lib/asserts/object/*.mjs",
122
122
  "require": "./lib/asserts/object/*.js",
123
- "types": "./lib/asserts/common/*.d.ts"
123
+ "types": "./lib/asserts/object/*.d.ts"
124
124
  },
125
125
  "./common/*": {
126
- "import": "./lib/asserts/common/*.js",
126
+ "import": "./lib/asserts/common/*.mjs",
127
127
  "require": "./lib/asserts/common/*.js",
128
128
  "types": "./lib/asserts/common/*.d.ts"
129
129
  }