all files / lib/deps/ functionName.js

100% Statements 11/11
100% Branches 2/2
100% Functions 3/3
100% Lines 11/11
2 statements, 2 functions, 1 branch Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28                        7015×          
"use strict";
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// shim for Function.prototype.name,
// for browsers that don't support it like IE
 
/* istanbul ignore next */
function f() {}
 
var hasName = f.name;
var res;
 
// We dont run coverage in IE
/* istanbul ignore else */
Eif (hasName) {
  res = function (fun) {
    return fun.name;
  };
} else {
  res = function (fun) {
    return fun.toString().match(/^\s*function\s*(\S*)\s*\(/)[1];
  };
}
 
exports.default = res;
module.exports = exports['default'];