Skip to content

walling/stack-formatted

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stack-formatted

Beautifully formatted stack traces.

Install:

npm install stack-formatted

Usage:

require('stack-formatted');

console.log(new Error().stackFormatted);
// All error objects contain the stackFormatted property.

Example output:

Example of stack-formatted stack trace in the terminal.


We use stack-json to produce the nicely formatted output. You can also use trace to get long stack trace in asynchronous code (mainly for debugging):

require('stack-formatted');
require('trace'); // load it after this module

setTimeout(function() {
  try {
    explode;
  } catch (error) {
    console.log(error.stackFormatted);
  }
}, 100);

About

Beautifully formatted stack traces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published