1.0.0 • Published 9 years ago
dwell v1.0.0
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']
1.0.0
9 years ago