
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
function-location
Advanced tools
This library is currently in beta and not fully stable.
The function-location library is a tool for finding the location of the currently executing function in a JavaScript environment. By utilizing this library, you can extract the source file path of the executing function.
npm i function-location
import { locate } from 'function-location';
function myFunction() {
const sourceFilePath = locate();
console.log(sourceFilePath);
}
myFunction();
The locate() function returns the source file path of the currently executing function as a string. If the function's location cannot be determined, it returns undefined.
This library is provided under the MIT license. The copyright for the relevant code is subject to that license.
FAQs
Retrieve `[[FunctionLocation]]` from V8.
The npm package function-location receives a total of 7 weekly downloads. As such, function-location popularity was classified as not popular.
We found that function-location demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.