getfunctionname

v0.1.0
Get the name of a function

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

Metadata

  • MIT
  • Whatever
  • James Monger
  • released 3/26/2016

Downloads

Maintainers