current-function
v1.0.0
Published
Gets the name of the current calling function
Downloads
5
Maintainers
Readme
Easy way to get the current calling functions name, even with 'use strict'!
Example Usage: const currentFunction = require('current-function');
function withName() {
console.log(currentFunction());
}
returns withName
class Testing {
anotherName() {
console.log(currentFunction());
}
}
let testing = new Testing();
testing.anotherName();
returns Testing.anotherName