fn-name

0.2.0 • Public • Published

fn-name Build Status

Get the name of a named function

There is a non-standard name property on functions, but it's not supported in all browsers.
This module tries that property then falls back to extracting the name from the function source.

Install

$ npm install --save fn-name
$ bower install --save fn-name
$ component install sindresorhus/fn-name

Usage

fnName(function foo() {});
//=> foo

License

MIT © Sindre Sorhus

Readme

Keywords

Package Sidebar

Install

npm i fn-name@0.2.0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • sindresorhus