A headless condition expression engine for filters and rule builders.
Define fields once, then validate, evaluate, and serialize the same AND/OR expression tree on the server and in the UI. The package has no React or DOM code — it owns the condition model, not the controls.
const contacts = defineConditions({
fields: {
status: {
type: 'enum',
schema: z.enum(['active', 'pending']),
operators: ['equals', 'not', 'in'],
},
age: {
type: 'number',
schema: z.number().int().min(0),
operators: ['gte', 'lte', 'between'],
},
},
})
const matches = contacts.evaluate(query, {
status: 'active',
age: 21,
})Version
0.0.1
Category
Logic
Downloads
0 weekly
Last updated
yesterday