Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stack-generator

stacktracejs10.7mMIT2.0.10TypeScript support: included

Generate artificial backtrace by walking arguments.callee.caller chain

stacktrace, error

readme

stack-generator

Build Status Coverage Status GitHub license dependencies module format code of conduct

Generate artificial stacktrace by walking arguments.callee.caller chain. Works everywhere except strict-mode.

Usage

StackGenerator.backtrace()

=> [StackFrame({functionName: 'foo', args: []}), StackFrame(..), StackFrame(..)]

Installation

npm install stack-generator
bower install stack-generator
https://raw.githubusercontent.com/stacktracejs/stack-generator/master/dist/stack-generator.min.js

Browser Support

Sauce Test Status

Contributing

Want to be listed as a Contributor? Start with the Contributing Guide!

changelog

v2.0.0

  • Upgrade stackframe dependency to 1.x. Stackframes are constructed and accessed differently. See the stackframe CHANGELOG for details.

v1.0.3

  • Fix edge case when parsing arguments with Firefox

v1.0.2

  • Name functions such that they can can be filtered out by stacktrace.js

v1.0.1

  • Provide standard distribution (minified and unminified).

v1.0.0

  • Add getArgs() and setArgs(args) methods

v0.1.0

  • Initial port from stacktrace.js