UNPKG

@vennersys/type-check

Version:

Library for checking js object property types

47 lines (29 loc) 1.78 kB
# [type-check](https://leewinter.github.io/type-check/) [![NPM](https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/@leewinter/type-check) ![License: MIT](https://img.shields.io/github/license/leewinter/type-check) ![Version](https://img.shields.io/github/package-json/v/leewinter/type-check) ![GitHub last commit](https://img.shields.io/github/last-commit/leewinter/type-check) ![GitHub pull requests](https://img.shields.io/github/issues-pr/leewinter/type-check) A lightweight and flexible JavaScript/TypeScript library for validating data structures with support for multiple data types, including strings, numbers, objects, arrays, functions, and symbols. This library provides a unified and extensible API for both runtime and compile-time validation. --- ## Features - **Supports Multiple Types**: Validate strings, numbers, objects, arrays, functions, symbols, dates, and more. - **Type Safety**: Full TypeScript support for type-safe validation. - **Custom Rules**: Easily add custom validation rules. - **Unified Interface**: A single API for both JavaScript and TypeScript usage. - **Runtime Checks**: Ensure values conform to expected types during execution. - **Comprehensive Feedback**: Provides detailed validation messages and statuses. --- ## [Visit the docs](https://leewinter.github.io/type-check/) ## Contributing Contributions are welcome! Please follow these steps: 1. Fork the repository. 2. Create a feature branch. 3. Commit your changes. 4. Submit a pull request. --- ## License This library is licensed under the [MIT License](LICENSE). --- ## Support For any questions or issues, feel free to open an issue on [GitHub](https://github.com/leewinter/type-check).