Skip to main content

js_cases

Function js_cases 

Source
pub fn js_cases(target: &str, value: &str, code: &str) -> String
Expand description

Every code’s sentence as JavaScript: one case arm per code assigning target, then a default arm, with the offending value spliced in from the variable value (a JS string) and an unknown code from the variable code. Rendered from message itself, so a host written out as JavaScript cannot word a failure differently from the reference tier.