There was an old trick used by Angular and a few other libraries of using a function’s source code (which you can get using
.toString()) to get its argument names. Promisify-node used this technique to find arguments called
cb. Angular uses it for dependency injection, though there are other better ways of doing that.