dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
16 lines (15 loc) • 762 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseShowEntityAttrOption = void 0;
const dynamoDBToolboxError_js_1 = require("../errors/dynamoDBToolboxError.js");
const isBoolean_js_1 = require("../utils/validation/isBoolean.js");
const parseShowEntityAttrOption = (showEntityAttr) => {
if (!(0, isBoolean_js_1.isBoolean)(showEntityAttr)) {
throw new dynamoDBToolboxError_js_1.DynamoDBToolboxError('options.invalidShowEntityAttrOption', {
message: `Invalid 'showEntityAttr' option: '${String(showEntityAttr)}'. 'showEntityAttr' must be a boolean.`,
payload: { showEntityAttr }
});
}
return showEntityAttr;
};
exports.parseShowEntityAttrOption = parseShowEntityAttrOption;