🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

function-location

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

function-location

Retrieve `[[FunctionLocation]]` from V8.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Description

You can 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.

Keywords

[[FunctionLocation]]

FAQs

Package last updated on 28 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts