Skip to content

Nhahan/function-location

Repository files navigation

Description

Retrieve the path of a class or function using this library, and it supports not only node command but also ts-node.

Installation

npm install function-location

Usage

import { locateV8 } from 'function-location';

class TestClass {
}

function testFunction() {
}

locateV8(TestClass);
locateV8(testFunction);

Return Value

The locateV8() function returns the source file path of the currently executing function as a string.

License

This library is licensed under the MIT license.

About

Retrieve `[[FunctionLocation]]` from V8.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published