7 repository-uri
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 este o bibliotecă Ruby concepută pentru definirea schemelor type-safe și a regulilor complexe de validare pentru a verifica și curăța structurile de date de intrare. Aceasta oferă un framework formal pentru construirea logicii de validare modulare, asigurând că informațiile primite îndeplinesc cerințele specifice de business și formatele de date înainte de a fi procesate de o aplicație. Biblioteca utilizează un limbaj specific domeniului (DSL) pentru a declara regulile de validare, care sunt apoi analizate în obiecte executabile. Se distinge printr-un sistem bazat pe macro-uri care grupează logica comună de validare în scurtături reutilizabile, alături de un model de compoziție recursivă care permite dezvoltatorilor să imbrice obiecte de validare pentru a construi structuri complexe, ierarhice. Această abordare permite crearea unei logici consistente, modulare, care previne duplicarea codului în aplicații mari. Dincolo de definirea schemei de bază, biblioteca include un pipeline de coerciție a tipurilor care transformă input-ul brut în formatele așteptate și un sistem structurat de agregare a erorilor care mapează eșecurile la căi specifice de intrare. Suportă hook-uri de configurare pentru integrarea dependențelor externe și oferă instrumente pentru curățarea datelor, făcând-o potrivită pentru impunerea standardelor pe cererile API primite și obiectele de date complexe.
Transforms raw input data into expected types during the validation process to ensure consistent downstream information.