es-arguments

1.0.2 • Public • Published

ES Arguments

Travis Build Codecov npm downloads

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    74
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    74
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i es-arguments

Weekly Downloads

74

Version

1.0.2

License

ISC

Last publish

Collaborators

  • rphansen91