snap-validate
Version:
Zero-dependency, ~4KB validation library for common patterns. CJS + ESM, Standard Schema support, no TypeScript compiler required.
23 lines (20 loc) • 504 B
JavaScript
/**
* Snap Validate - ESM entry point.
*
* A thin wrapper over the single CommonJS implementation (zero build step).
* Both module systems share the same class objects, so `instanceof
* BaseValidator` works across CJS and ESM consumers (no dual-package hazard).
*/
import cjs from '../src/index.js';
export const {
BaseValidator,
ValidationResult,
validators,
validate,
validateAsync,
toStandardSchema,
safeRegexTest,
safeRegexTestSync,
isRegexSafe
} = cjs;
export default cjs;