Skip to main content

Module utils

Module utils 

Source

Functionsยง

format_expression
Format an Expression as a human-readable string
number_from_f64
Convert f64 to serde_json::Number, returning 0 for NaN/Infinity instead of panicking
parse_datetime
Parse a date value (timestamp or ISO string) into DateTime
safe_regex
Create a regex with safety limits to prevent ReDoS attacks. While the Rust regex crate is inherently ReDoS-resistant (uses Thompson NFA), we still limit pattern size and compiled size to prevent memory exhaustion.