get-function-name
v0.0.1
Published
Get name of a function
Downloads
15
Readme
get-function-name
Get the name of a function
Install
With npm
npm install get-function-name
Usage
Node.js
var getFunctionName = require('get-function-name')
var foo = function() {}
function bar() {}
getFunctionName(foo) // 'anonymous'
getFunctionName(bar) // 'bar'
getFunctionName('hello') // null