prisma-criteria
Version:
Parses, validates, and creates a criteria object that can be passed to the Prisma "findMany" method to query a list of resources matching the given filters, pagination and order.
5 lines • 296 B
JavaScript
export const validationError = (v) => ({ _result: 'error', error: v });
export const validationOk = (v) => ({ _result: 'ok', ok: v });
export const isValidationOk = (e) => e._result === 'ok';
export const isValidationErr = (e) => e._result === 'error';
//# sourceMappingURL=validation.util.js.map