Socket
Book a DemoInstallSign in
Socket

function-params

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

function-params

Get parameter names for a given function (with ES6 arrow syntax support)

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

function-params

Build status NPM version

Get parameter names for a given function (with ES6 arrow syntax support)

Installation

Install function-params using npm:

npm install --save function-params

Usage

Module usage

var functionParams = require('function-params');

functionParams(function (a, b, /* c */ d, e = 'f')); // ['a', 'b', 'd', 'e']

// Arrow functions:
functionParams(a => a); // ['a']

API

functionParams(fn)

NameTypeDescription
fnFunctionThe function to get parameter names for

Get parameter names from a function.

functionParams.fromString(str)

NameTypeDescription
strStringA stringified function to get parameter names for

Get parameter names from a function string.

License

MIT

Keywords

function

FAQs

Package last updated on 29 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts