Vex is a simple schema validator for JavaScript objects, supporting Node.js and browser environments (UMD build). The npm package is at version 0.0.4 with an unstable release cadence. It allows defining schemas with type constraints (String, Number, etc.), optional/required fields, argument schemas, and custom assertion functions. Unlike Joi or Yup, Vex is minimal with no dependencies but lacks active maintenance.
npm install vexNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Validates an object against a schema using Vex. Shows basic usage with String and Number types, and error handling via status().
Migrate to a maintained validator like Zod or Joi.
Use vex.settings.throw = false before calling vex()
Check if vex() returns true to handle invalid state.
Use require('vex') or import vex from 'vex'Run npm install vex
No dependency data recorded yet.