From 82e681a19174ea2dbef98c55e1df9a2aca0c15e9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 9 Jan 2017 18:32:56 -0800 Subject: [PATCH] Remove `_getFuncName`. --- _getFuncName.js | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 _getFuncName.js diff --git a/_getFuncName.js b/_getFuncName.js deleted file mode 100644 index 653ff04d3..000000000 --- a/_getFuncName.js +++ /dev/null @@ -1,28 +0,0 @@ -import realNames from './_realNames.js'; - -/** Used to check objects for own properties. */ -const hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ -function getFuncName(func) { - const result = `${ func.name }`; - const array = realNames[result]; - let length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - const data = array[length]; - const otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; -} - -export default getFuncName;