is-kit 1.0.4 → 1.0.5
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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -275,8 +275,8 @@ function struct(schema, options) {
|
|
|
275
275
|
if (!isPlainObject(input)) return false;
|
|
276
276
|
const obj = input;
|
|
277
277
|
for (const key of Object.keys(schema)) {
|
|
278
|
-
if (!(key in obj)) return false;
|
|
279
278
|
const guard = schema[key];
|
|
279
|
+
if (!(key in obj)) return false;
|
|
280
280
|
if (!guard(obj[key])) return false;
|
|
281
281
|
}
|
|
282
282
|
if (options?.exact) {
|
package/dist/index.mjs
CHANGED
|
@@ -200,8 +200,8 @@ function struct(schema, options) {
|
|
|
200
200
|
if (!isPlainObject(input)) return false;
|
|
201
201
|
const obj = input;
|
|
202
202
|
for (const key of Object.keys(schema)) {
|
|
203
|
-
if (!(key in obj)) return false;
|
|
204
203
|
const guard = schema[key];
|
|
204
|
+
if (!(key in obj)) return false;
|
|
205
205
|
if (!guard(obj[key])) return false;
|
|
206
206
|
}
|
|
207
207
|
if (options?.exact) {
|