javascript get function definition as string