7 repositorios
Type conversion operations that return null instead of raising errors on failure.
Distinct from Data Type Casting: Focuses on safe, non-raising type casting, distinct from general data type conversion or arithmetic-specific casting.
Explore 7 awesome GitHub repositories matching data & databases · Safe Casting. Refine with filters or upvote what's useful.
Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks. The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def
Transforms input data through a sequence of coercion rules before performing correctness assertions.
Joi is a JavaScript data validation library used to define schemas that ensure the structure and data types of objects remain consistent. It functions as a schema-based validator and object schema definition tool, preventing invalid information from entering an application by checking data against predefined constraints and rules. The library employs a chainable fluent interface and a constraint-based validation engine to build complex validation pipelines. It utilizes recursive tree traversal to validate nested data structures and a type-coercion pipeline to transform input values into the t
Transforms input values into target schema types via a coercion pipeline before applying validation rules.
Crystal is a statically typed, compiled programming language designed for high performance and memory safety. It leverages an LLVM-based compiler to translate source code into optimized machine-executable binaries, while its type-inference-based static analysis enforces strict safety rules during the build process. The language distinguishes itself through a fiber-based concurrent runtime that manages lightweight execution units for asynchronous input and output without blocking the main process. It also features a powerful compile-time macro system that allows for the inspection and transfor
Attempts to cast an object to a specific type and returns nil instead of raising an error if the conversion is not possible.
RxKotlin is a reactive programming library and asynchronous stream processor that provides Kotlin language extensions for composing event-based data streams. It serves as a set of Kotlin bindings for RxJava, allowing developers to transform, filter, and flatten sequences of data emitted over time. The library focuses on integrating RxJava patterns into Kotlin projects by applying language-specific conventions and idioms. It utilizes extension functions to simplify reactive programming patterns, reduce boilerplate, and optimize workflows within the reactive ecosystem. The toolkit covers a bro
Uses language-level type constraints to filter and cast stream elements while maintaining compile-time type safety.
From Java To Kotlin - Your Cheat Sheet For Java To Kotlin
Shows Kotlin's safe-cast operator combining type checking and smart casting.
Structs is a reflection utility and type inspection framework for Go. It provides tools for inspecting, converting, and validating data structures by extracting field names, tags, and values from Go objects. The library specializes in transforming Go structs into generic maps or slices for serialization and data manipulation. It utilizes tag-driven mapping to determine custom keys and exclusion rules during these transformations. The project covers broader capabilities including metadata extraction, type validation to verify if variables are structs or pointers, and initialization verificati
Validates if variables are structs or pointers to ensure safe reflection operations without raising errors.
Dry-validation es una biblioteca de Ruby diseñada para definir esquemas con seguridad de tipos y reglas de validación complejas para verificar y sanitizar estructuras de datos de entrada. Proporciona un framework formal para construir lógica de validación modular, asegurando que la información entrante cumpla con requisitos comerciales y formatos de datos específicos antes de ser procesada por una aplicación. La biblioteca utiliza un lenguaje específico de dominio (DSL) para declarar reglas de validación, que luego se analizan en objetos ejecutables. Destaca por un sistema basado en macros que agrupa la lógica de validación común en atajos reutilizables, junto con un modelo de composición recursiva que permite a los desarrolladores anidar objetos de validación para construir estructuras complejas y jerárquicas. Este enfoque permite la creación de lógica consistente y modular que evita la duplicación de código en aplicaciones grandes. Más allá de la definición de esquema central, la biblioteca incluye un pipeline de coerción de tipos que transforma la entrada bruta en formatos esperados y un sistema de agregación de errores estructurado que mapea las fallas a rutas de entrada específicas. Admite ganchos de configuración para la integración de dependencias externas y proporciona herramientas para sanitizar datos, lo que la hace adecuada para aplicar estándares en solicitudes de API entrantes y objetos de datos complejos.
Transforms raw input data into expected types during the validation process to ensure consistent downstream information.