normul
Version:
Normul is a tiny TypeScript/JavaScript library for data normalization and transformation
17 lines • 454 B
JavaScript
import { Schema } from '../Schema.js';
export class UndefinedSchema extends Schema {
_normalize(input, ctx) {
if (input === undefined) {
return input;
}
this.makeIssue({
ctx,
message: 'Converted to undefined',
level: 'warn',
expected: 'undefined',
received: input,
});
return undefined;
}
}
//# sourceMappingURL=UndefinedSchema.js.map