more tests, error throwing as option, comma support on $text, javascript style