Skip to content

ridh21/superval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperVal - A Super Fast TypeScript Validation Library ⚡

NPM Version

🚀 About

SuperVal is a blazing-fast, lightweight, and TypeScript-first validation library designed to be an alternative to Zod, providing better performance and developer experience. It ensures type safety while keeping your schemas concise and efficient.

✨ Features

  • Super Fast – Optimized for speed, faster than Zod.
  • TypeScript-First – Ensures full type safety with zero compromises.
  • 🪶 Lightweight – Minimal bundle size, perfect for both frontend and backend.
  • 🔄 Runtime Validation – Checks data at runtime while maintaining TypeScript inference.
  • 🏗 Schema-Based – Create, validate, and infer types effortlessly.

📦 Installation

npm install superval

or using yarn:

yarn add superval

🔥 Quick Start

import { defineSchema, validate } from "superval";

const userSchema = defineSchema({
  name: "string",
  age: "number|min:18|max:60",
  email: "email",
  website: "url",
  userId: "uuid",
});

const userData = {
  name: "John Doe",
  age: 25,
  email: "john@example.com",
  website: "https://example.com",
  userId: "550e8400-e29b-41d4-a716-446655440000",
};

const result = validate(userSchema, userData);

console.log(result.isValid ? "✅ Valid data!" : "❌ Validation errors:", result.errors);

🏆 Why Choose SuperVal?

Feature SuperVal Zod
Speed ⚡ Faster 🐢 Slower
Type Safety ✅ Yes ✅ Yes
Bundle Size 🪶 Smaller 📦 Larger
Ease of Use 🎯 Simple API 🏗 Complex

📖 Documentation

Coming Soon..

🤝 Contributing

We welcome contributions! Feel free to open issues and pull requests.

📜 License

Licensed under the MIT License.

⭐ Support

If you like SuperVal, consider giving it a ⭐ on GitHub!

About

Blazing-fast, lightweight, and TypeScript-first validation library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published