JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10008
  • Score
    100M100P100Q132899F
  • License MIT

Get the argument names of a JavaScript function

Package Exports

  • fn-annotate

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fn-annotate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fn-annotate

NPM Version Build Status NPM Downloads License

Get the argument names of a JavaScript function.

Install

npm install --save fn-annotate

Usage

var annotate = require('fn-annotate');

function myFunction (user, document, db) {
  // do some stuff.
}

var argumentNames = annotate(myFunction);

// [ 'user', 'document', 'db' ]
console.log(argumentNames);

// [ 'x' ]
console.log(annotate(x => x));

// [ 'param' ]
console.log(annotate(function * (param) {}));