1.0.0 • Published 7 years ago
current-function v1.0.0
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
1.0.0
7 years ago