@nerdware/ddb-single-table
Version:
A schema-based DynamoDB modeling tool, high-level API, and type-generator built to supercharge single-table designs!⚡
16 lines (15 loc) • 429 B
JavaScript
/**
* Type-guard function for `WhereQueryOperator`.
*
* @param str The string to check.
* @returns A boolean indicating whether the provided `str` is a valid `WhereQueryOperator`.
*/
export const isValidWhereQueryOperator = (str) => {
return (str === "eq"
|| str === "lt"
|| str === "lte"
|| str === "gt"
|| str === "gte"
|| str === "between"
|| str === "beginsWith");
};