get-params
Get a list of function's argument variable names
Last updated 10 years ago by fahad19 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install get-params 
SYNC missed versions from official npm registry.

get-params

Build Status

Get a list of function's argument variable names (parameters).

Install

$ npm install --save get-params

Usage

var getParams = require('get-params');

var myFunction = function (one, two, three) {
	return 'blah';
};

var params = getParams(myFunction);
console.log(params); // ['one', 'two', 'three']

Browser

You can also run it in the browser. Install it with bower:

$ bower install --save get-params

Include the script in your HTML:

<script src="./bower_components/get-params/index.js"></script>

The library will be available in window.GetParams:

var params = GetParams(myFunction);

License

MIT © Fahad Ibnay Heylaal

Current Tags

  • 0.1.2                                ...           latest (10 years ago)

3 Versions

  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE