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