def _convert_js_arg(arg):
 if (arg is None):
  return 'undefined'
 elif isinstance(arg, str):
  return '"{}"'.format(string_escape(arg))
 elif isinstance(arg, bool):
  return str(arg).lower()
 elif isinstance(arg, (int, float)):
  return str(arg)
 else:
  raise TypeError("Don't know how to handle {!r} of type {}!".format(arg, type(arg).__name__))

def _convert_js_arg ( arg ) : if ( arg is None ) : return 'undefined' elif isinstance ( arg , str ) : return '"{}"' . format ( string_escape ( arg ) ) elif isinstance ( arg , bool ) : return str ( arg ) . lower ( ) elif isinstance ( arg , ( int , float ) ) : return str ( arg ) else : raise TypeError ( "Don't know how to handle {!r} of type {}!" . format ( arg , type ( arg ) . __name__ ) )
convert the given argument so its the equivalent in js .