
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
error-stack-parser
Advanced tools
The error-stack-parser package is a utility for parsing and extracting information from JavaScript Error stacks. It provides a structured way to interpret error stack strings, making it easier to programmatically analyze errors, log them in a more readable format, or display them in user interfaces. It's particularly useful in applications where understanding the context and source of an error is crucial for debugging or error handling.
Parsing Error Stacks
This feature allows you to parse the stack property of Error objects into a more structured format. Each element in the returned array represents a frame in the stack trace, with properties such as the function name, file name, line number, and column number. This makes it easier to analyze and display error information programmatically.
const ErrorStackParser = require('error-stack-parser');
const error = new Error('This is a test error');
const stackFrames = ErrorStackParser.parse(error);
console.log(stackFrames);
stacktrace-js provides similar functionality to error-stack-parser by offering mechanisms to capture, parse, and manipulate JavaScript stack traces. It goes a bit further by also allowing stack trace collection from all browsers and generating stack traces from thrown errors or caught exceptions. Compared to error-stack-parser, stacktrace-js might offer a broader set of features for handling stack traces across different environments.
source-map-support is a package that adds source map support to node.js (for converting compiled code locations to their original source locations). While not a direct alternative to error-stack-parser, it complements its functionality by allowing developers to obtain accurate stack traces in their original source code, not the transpiled or compiled version. This is especially useful in projects where code is bundled or transpiled.
ErrorStackParser.parse(new Error("sample"));
=> [StackFrame('funName1', [], 'path/to/file.js', 35, 79), StackFrame(..)]
npm install error-stack-parser
bower install error-stack-parser
https://raw.githubusercontent.com/stacktracejs/error-stack-parser/master/dist/error-stack-parser.min.js
v0.2.4
FAQs
Extract meaning from JS Errors
The npm package error-stack-parser receives a total of 13,451,548 weekly downloads. As such, error-stack-parser popularity was classified as popular.
We found that error-stack-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.