es-arguments
v1.0.1 es6 Reflection arguments parameters
ES Arguments
Description
Get the argument names of any es method.
Usage
npm install es-arguments
const getArguments = require('es-arguments')
getArguments(function (arg1, arg2) {}) // ['arg1', 'arg2']
getArguments(function (arg1=1, arg2=2) {}) // ['arg1', 'arg2']
getArguments(function ({ arg1, arg2 }) {}) // ['{ arg1, arg2 }']
getArguments(function (args = { arg1, arg2 }) {}) // ['args']
getArguments((arg1, arg2) => {}) // ['arg1', 'arg2']
npm i [email protected]
Metadata
- ISC
- Whatever
- Ryan P. Hansen
- released 10/14/2017