Say you have two functions with the following signatures:
addClass( class )
addClass( class, duration )
If you are using node you can use func.toString() and parse the result to get the signature that was being used.
func.toString()