getfunctionname

0.3.2 • Public • Published

getfunctionname

Get the readable name of a function.

Installation

$ npm install getfunctionname

Usage

var getFunctionName = require('getfunctionname');
 
getFunctionName(function someFunction () { }); // 'someFunction'
getFunctionName(function ANOTHER_FUNCTION () { }); // 'ANOTHER_FUNCTION'
 
getFunctionName(() => { }); // 'anonymous'
getFunctionName(function () { }); // 'anonymous'

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.2
    1
    • latest

Version History

Package Sidebar

Install

npm i getfunctionname

Weekly Downloads

2

Version

0.3.2

License

MIT

Last publish

Collaborators

  • jameskmonger