GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NeaByteLab/Stackz: Beautiful stack trace formatter with source code context for JavaScript.

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.config.ts
build.config.ts
 
 
deno.json
deno.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

Stackz Module type: CJS+ESM npm version JSR Node.js CI

Beautiful stack trace formatter with source code context for JavaScript.

Demo

Features

  • Cross-runtime support - Works in Deno, Node.js, Bun, and browsers
  • Source code context - Shows actual code around error locations (detailed mode)
  • Two formatting styles - Compact and detailed stack traces
  • ANSI colors - Beautiful terminal output with syntax highlighting

Installation

Choose your preferred package manager:

# npm package
npm install @neabyte/stackz

# Deno module
deno add jsr:@neabyte/stackz

Usage

import Stackz from '@neabyte/stackz'

try {
  // Your code that might throw
  throw new Error('Something went wrong')
} catch (error) {
  // Compact format without source context
  console.log(Stackz.format(error, 'compact'))
  // Detailed format with source context
  console.log(await Stackz.format(error, 'detailed'))
}

Formats

Compact

TypeError  Cannot read properties of undefined (reading 'property')
  → createTypeError @ index.ts:5:14
  → index.ts:15:3

Detailed

TypeError  Cannot read properties of undefined (reading 'property')

Path: /path/to/project/index.ts:5:14
  2 |
  3 | function createTypeError() {
  4 |   const obj = undefined as any
  5     return obj.property // This will create TypeError with real stack
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6 | }

Call Stack:
 • createTypeError → index.ts:5:14
 • anonymous → index.ts:15:3

License

This project is licensed under the MIT license. See the LICENSE file for more info.

About

Beautiful stack trace formatter with source code context for JavaScript.

Topics

browserbunclicross-platformdebuggingdenodeveloper-toolserror-formattingerror-handlingformatterjavascriptloggingnodejspretty-printsource-codestack-tracesyntax-highlightingterminaltypescriptutility

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.