Create JavaScript functions with argument type detection