$ gnpm install fn-name
Get the name of a named function
There is a 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.
$ npm install fn-name
import functionName from 'fn-name';
functionName(function foo() {});
//=> 'foo'
Copyright 2013 - present © cnpmjs.org | Home |