Create JavaScript functions with built-in argument type detection