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