dwell

1.0.0 • Public • Published

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']

Package Sidebar

Install

npm i dwell

Weekly Downloads

113

Version

1.0.0

License

MIT

Last publish

Collaborators

  • amanvirk