Port cilantro/structs to JavaScript

Signed-off-by: Don Naegely <naegelyd@gmail.com>
No need for `else` since `if` returns above.