Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

current-function

bearjaws13Apache-2.01.0.0

Gets the name of the current calling function

function, name, current, function, name

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