export default function getFnName(fn: any) {
  fn = Object(fn);
  var F = typeof fn == 'function';
  var N = fn.name;
  var S = F && ((N && ['', N]) || fn.toString().match(/function ([^\(]+)/));
  return (!F && 'not a function') || (S && S[1]) || 'anonymous';
}
