refine-jsonapi
Version:
Data provider for refine with JSON:API specification. refine is a React-based framework for building internal tools, rapidly. JSON:API is a specification for building apis in JSON.
22 lines (20 loc) • 424 B
text/typescript
import { CrudOperators } from "@refinedev/core";
export const mapOperator = (operator: CrudOperators): string => {
switch (operator) {
case "eq":
case "ne":
case "gt":
case "lt":
case "gte":
case "lte":
case "in":
case "nin":
case "null":
case "nnull":
return `${operator}`;
case "contains":
return "like";
default:
return "";
}
};