1 var realNames = require('./_realNames');
3 /** Used for built-in method references. */
4 var objectProto = Object.prototype;
6 /** Used to check objects for own properties. */
7 var hasOwnProperty = objectProto.hasOwnProperty;
10 * Gets the name of `func`.
13 * @param {Function} func The function to query.
14 * @returns {string} Returns the function name.
16 function getFuncName(func) {
17 var result = (func.name + ''),
18 array = realNames[result],
19 length = hasOwnProperty.call(realNames, result) ? array.length : 0;
22 var data = array[length],
23 otherFunc = data.func;
24 if (otherFunc == null || otherFunc == func) {
31 module.exports = getFuncName;