@dzeio/schema 0.3.1 → 0.3.2

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/Schema.js CHANGED
@@ -354,6 +354,7 @@ var SchemaObject = class extends SchemaItem {
354
354
  };
355
355
  }
356
356
  const clone = (0, import_object_util2.objectClone)(object);
357
+ const res = {};
357
358
  (0, import_object_util2.objectLoop)(this.model, (childSchema, key) => {
358
359
  const childValue = clone[key];
359
360
  const child = childSchema.parse(childValue);
@@ -363,13 +364,13 @@ var SchemaObject = class extends SchemaItem {
363
364
  field: it.field ? `${key}.${it.field}` : key
364
365
  })));
365
366
  }
366
- clone[key] = child.object;
367
+ res[key] = child.object;
367
368
  return child.valid || !(options == null ? void 0 : options.fast);
368
369
  });
369
370
  return {
370
371
  valid: errors.length === 0,
371
372
  errors,
372
- object: clone
373
+ object: res
373
374
  };
374
375
  }
375
376
  isOfType(input) {
package/dist/Schema.mjs CHANGED
@@ -311,6 +311,7 @@ var SchemaObject = class extends SchemaItem {
311
311
  };
312
312
  }
313
313
  const clone = objectClone(object);
314
+ const res = {};
314
315
  objectLoop(this.model, (childSchema, key) => {
315
316
  const childValue = clone[key];
316
317
  const child = childSchema.parse(childValue);
@@ -320,13 +321,13 @@ var SchemaObject = class extends SchemaItem {
320
321
  field: it.field ? `${key}.${it.field}` : key
321
322
  })));
322
323
  }
323
- clone[key] = child.object;
324
+ res[key] = child.object;
324
325
  return child.valid || !(options == null ? void 0 : options.fast);
325
326
  });
326
327
  return {
327
328
  valid: errors.length === 0,
328
329
  errors,
329
- object: clone
330
+ object: res
330
331
  };
331
332
  }
332
333
  isOfType(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzeio/schema",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "dependencies": {
5
5
  "@dzeio/object-util": "^1.8.3"
6
6
  },