Socket
Socket
Sign inDemoInstall

fn-annotate

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fn-annotate

Get the argument names of a JavaScript function


Version published
Weekly downloads
13K
decreased by-0.53%
Maintainers
1
Install size
12.1 kB
Created
Weekly downloads
 

Readme

Source

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) {}));

Keywords

FAQs

Last updated on 20 May 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc