dwell
v1.0.0
Published
micro module to inspect contructor injections and get them back as an array.
Downloads
785
Maintainers
Readme
Dwell
Unfortunately Javascript does not have a reflection api to inspect methods to get list of method arguments. Dwell will help you in inspecting a method or class contructor to get an array of parameters.
var dwell = require('dwell')
class Greet {
constructor (foo,bar) {
}
}
dwell.inspect(Greet.toString())
// outputs ['foo','bar']
or for a javascript function
function HelloWorld(baz) {
}
dwell.inspect(HelloWorld.toString())
// outputs ['baz']