Skip to content

10xly/name-of-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

name-of-function

Get the name of a function. Returns undefined if functions don't have names.

Installation

npm install name-of-function

Usage

const getFunctionName = require("name-of-function")
getFunctionName(getFunctionName) // "getFunctionName"
getFunctionName(function e() {}) // "e"

Tests

There are no tests.