Signature
- Namespace
- Class
Parameters
- value - Value to validate (any type)
Returns
boolean - true if value can be converted to CallData, false otherwise
Examples
- Basic Usage
- Input Validation
- Type Guard Pattern
Validation Rules
Checks multiple criteria:- Hex Strings
- Byte Arrays
Use Cases
API Input Validation
Safe Constructor Pattern
Form Validation
Batch Validation
Performance
Validation is fast (basic checks only):Comparison with Constructor
- isValid (Safe)
- Try-Catch (Verbose)
- No try-catch needed
- Clear validation logic
- Better performance (checks once)
isValid for cleaner validation logic.
Type Narrowing
TypeScript doesn’t narrow types withisValid:
is() type guard instead.

