Sha256: 72ca31c17fdcf604fe1143a8edd10ef54af525fdb03ec80f06a7480aa8363253

Contents?: true

Size: 542 Bytes

Versions: 153

Compression:

Stored size: 542 Bytes

Contents

var realNames = require('./realNames');

/**
 * Gets the name of `func`.
 *
 * @private
 * @param {Function} func The function to query.
 * @returns {string} Returns the function name.
 */
function getFuncName(func) {
  var result = (func.name + ''),
      array = realNames[result],
      length = array ? array.length : 0;

  while (length--) {
    var data = array[length],
        otherFunc = data.func;
    if (otherFunc == null || otherFunc == func) {
      return data.name;
    }
  }
  return result;
}

module.exports = getFuncName;

Version data entries

153 entries across 80 versions & 8 rubygems

Version Path
trusty-festivity-extension-2.5.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.5.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.5.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.5.0 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.5.0 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.6 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.5 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.5 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.4 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.4 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.3 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.2 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.0 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.4.0 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/getFuncName.js
trusty-festivity-extension-2.3.30 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/getFuncName.js