dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
18 lines (17 loc) • 406 B
JavaScript
import { checkPrimitiveSchema } from '../primitive/check.js';
export class NullSchema {
constructor(props) {
this.type = 'null';
this.props = props;
}
get checked() {
return Object.isFrozen(this.props);
}
check(path) {
if (this.checked) {
return;
}
checkPrimitiveSchema(this, path);
Object.freeze(this.props);
}
}