A function overloading implementation for javascript.