{"library":"stack-parser","title":"Error Stack Parser","type":"library","description":"stack-parser is a minimalist utility for parsing JavaScript error stack traces within Node.js environments. It takes a raw error stack string and converts it into a structured array of objects, each representing a stack frame. The package provides methods to format these frames, including custom formatting options. As of 2026, its stable version remains `0.0.1`, initially released in 2012. This indicates the package is effectively unmaintained and has seen no significant updates or feature additions over a decade. Due to its age, it primarily targets older Node.js versions and CommonJS environments, lacking support for modern ES Modules or TypeScript definitions. While functional for basic stack parsing, developers should be aware of its abandonment and consider more actively maintained alternatives for robust, cross-environment stack parsing needs.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install stack-parser"],"cli":null},"imports":["const stackParser = require('stack-parser');","const stackParser = require('stack-parser');\nconst items = stackParser.parse((new Error).stack);","const stackParser = require('stack-parser');\nconst items = stackParser.here();"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/scaryzet/node-stack-parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/stack-parser","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"const stackParser = require('stack-parser');\n\n// Parse the current error stack\nconst items = stackParser.parse((new Error).stack);\n\nconsole.log('--- Default Formatting ---');\nitems.forEach(function(item) {\n\tconsole.log(item.format());\n});\n\nconsole.log('\\n--- Custom Formatting (long) ---');\nitems.forEach(function(item) {\n\tconsole.log(item.format('%what (%file, line: %line, column: %column)'));\n});\n\nconsole.log('\\n--- Custom Formatting (short) ---');\nitems.forEach(function(item) {\n\tconsole.log(item.format('%w (%f, line: %l, column: %c)'));\n});\n\nconsole.log('\\n--- Using .here() for current stack ---');\nconst currentStackItems = stackParser.here();\ncurrentStackItems.forEach(function(item) {\n\tconsole.log(item.format());\n});","lang":"javascript","description":"Demonstrates parsing the current execution stack using `stack-parser` and applying various formatting options for the stack frame objects, including the `here()` convenience method.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}