M
M
Mike Evstropov2016-01-13 14:12:00
Node.js
Mike Evstropov, 2016-01-13 14:12:00

How to find method name in Node.js?

var a = { f : function(){ console.log( '%имя метода%' ) } }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
index0h, 2016-01-13
@Aroused

You can: arguments.callee.name
However, in your case, the function doesn't have a name.

var f1 = function () {
    console.log(arguments.callee.name);
};
var f2 = function f2() {
    console.log(arguments.callee.name);
};

f1();
f2();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question