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

stackframes

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stackframes

stackframes

latest
Source
npmnpm
Version
0.0.4-alpha
Version published
Maintainers
1
Created
Source

stackframes

stackframes

https://www.npmjs.com/package/stackframes

https://serapath.github.io/stackframes/

use

npm install stackframes

const stackframes = require('stackframes')

demo()

function demo () {
  var error

  try {
    function foobarbaz () { throw new Error('foobar') }
    function bazbarfoo () { foobarbaz() }
    bazbarfoo()
  } catch (e) {
    error = e
  }

  example()
  function example () { foo() }
  function foo () { bar() }
  function bar () { baz() }
  function baz () {

    const defaultFlags = stackframes.defaultFlags
    console.log(defaultFlags)
    const flags = defaultFlags.filter((_, i) => i%2) // take every second flag

    console.log('0', stackframes(error, flags))
    console.log('1', stackframes())
    console.log('2', stackframes({ exclude: foo }))
    console.log('3', stackframes({ exclude: example }))
    console.log('4', stackframes({ depths: 2, exclude: baz }))
    console.log('5', stackframes({ depths: 2 }))
    console.log('6', stackframes(null, flags))
  }
}

Keywords

callsite

FAQs

Package last updated on 22 May 2020

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