New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stack-trace-v8

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stack-trace-v8

Get v8 stack traces as a detailed array of CallSite objects.

latest
Source
npmnpm
Version
1.1.6
Version published
Maintainers
1
Created
Source

stack-trace-v8

Get v8 stack traces as a detailed array of CallSite objects. Determine through which functions your code is called. either find the entire history of the code or detect the first or last function.

Install

    npm install stack-trace-v8
    yarn add stack-trace-v8

Usage

import StackTrace, { LastTrace, FirstTrace } from "stack-trace-v8";

const FirstFunction = () => {
  SecondFunction();
};

FirstFunction();

const SecondFunction = () => {
  console.log(StackTrace());
  console.log(LastTrace());
  console.log(FirstTrace());
};

// Output StackTrace:
// [
//   {
//     caller: "FirstFunction",
//     file: "http://localhost/index.js",
//     fileName: "index.js",
//     line: "1:1"
//   },
//   {
//     caller: "SecondFunction",
//     file: "http://localhost/index.js",
//     fileName: "index.js",
//     line: "1:1"
//   }
// ]

// Output LastTrace:
// {
//   caller: "SecondFunction",
//   file: "http://localhost/index.js",
//   fileName: "index.js",
//   line: "1:1"
// }

// Output FirstTrace:
// {
//   caller: "FirstFunction",
//   file: "http://localhost/index.js",
//   fileName: "index.js",
//   line: "1:1"
// }

License

MIT (c) Abdullah Dalgıç

Keywords

stack

FAQs

Package last updated on 28 Dec 2022

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