Thanks Charles, I can add the tests later. I'll wait with the PR until I get a chance to test this tomorrow - since there is a large chunk of code changing. On a related note, do you remember the reason for us using JSON.stringify rather than String() directly? I feel like we examined this before but don't remember why we didn't use String().
All other conversions make use of regular JS converters:
int() = parseInt()
float() = parseFloat()
bool() = !!()
str() = JSON.stringify()
Also, since JS has the concept of "String" vs "new String" (it's features like this that make me want to avoid pure JS), I tested a few current ways of calling "String" from within RapydScript, and was a bit surprised to see 2/4 of the ways fail. I will need to submit a fix for these over the weekend as well
a = JS("String(stuff_to_convert)") # works
a = String.call(this, stuff_to_convert) # broken, call should be a "static" method on String (along with apply, etc.)
a = (String)(1+2) # broken, String without () should not trigger a 'new'
toStr = String; a = toStr(stuff_to_convert) # works