https://github.com/yosiat/stack-frames
https://github.com/yosiat/stack-frames
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yosiat/stack-frames
- Owner: yosiat
- License: mit
- Created: 2020-06-20T18:47:25.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-05T18:48:01.000Z (2 months ago)
- Last Synced: 2025-04-14T17:06:13.314Z (about 2 months ago)
- Language: JavaScript
- Size: 31.3 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# stack-frames
Allows getting stack-frames at specific position with low overhead.
### API
#### stackFrames.getAt(number)
given a position returns stack-frames object (which contains file_name and line_number) at the requested position
### Benchmarks
`MacBook Pro, Apple M4 Max` with `Node v22.14.0`
Run using `node benchmark.js`
```
stackFrames#getAt x 723,520 ops/sec ±4.24% (52 runs sampled)
callsites()[] x 324,443 ops/sec ±0.44% (92 runs sampled)
```