31 lines
1.8 KiB
Markdown
31 lines
1.8 KiB
Markdown
stack-generator
|
|
===============
|
|
[](https://github.com/stacktracejs/stack-generator/actions?query=workflow%3AContinuous+Integration+branch%3Amaster)
|
|
[](https://coveralls.io/r/stacktracejs/stack-generator?branch=master)
|
|
[](https://opensource.org/licenses/MIT)
|
|
[](https://github.com/stacktracejs/stack-generator/releases)
|
|
[](https://github.com/stacktracejs/stack-generator/releases)
|
|
[](http://todogroup.org/opencodeofconduct/#stacktrace.js/me@eriwen.com)
|
|
|
|
Generate artificial stacktrace by walking `arguments.callee.caller` chain. **Works everywhere except [strict-mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/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
|
|
[](https://saucelabs.com/u/stacktracejs)
|
|
|
|
## Contributing
|
|
Want to be listed as a *Contributor*? Start with the [Contributing Guide](CONTRIBUTING.md)!
|