Open georgolden opened 2 years ago
Is your feature request related to a problem? Please describe.
const schema = new Schema('File', { Entity: {}, size: 'number', ratio: { method: (file) => file.size / 10, returns: 'number' }, }); const obj = { size: 100 }; const obj1 = schema.calculate(obj); // Schema.check(obj); // Assign new calculated fields with given object
For memory only shorthand:
const schema = new Schema('File', { size: 'number', ratio: (file) => file.size / 10, }); const obj = { size: 100 }; const obj1 = schema.calculate(obj); // Schema.check(obj); // Assign new calculated fields with given object
I'll try to solve this issue
Is your feature request related to a problem? Please describe.
For memory only shorthand: