Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodexh

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodexh

a wrapper around the `node` executable for better stacktraces with sourcemaps, sourcecode excerpts

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

NodeXH: NodeJS With a Better Exception Handler

Table of Contents generated with DocToc

What It Is

NodeXH is a drop-in wrapper for the NodeJS executable hat provides better stacktraces.

How to Install

npm install -g nodexh

How to Use

Use nodexh path/to/file.js instead of node path/to/file.js, and you're good to go.

What to Expect

  • Stack trace items will be reversed, so most recent calls will be shown last, i.e. also closest to where the cursor of your terminal is.
  • Stack traces will show source contexts (3 lines by default) except where files can not be opened or are NodeJS internals.
  • Source code shown will honor sourcemaps, which is great when you're using the likes of CoffeeScript or TypeScript.
  • The error message will be repeated to avoid having to scroll up when stack traces get longer.
  • Colors!

To Do

  • Add error.name, error.code; where node reports TypeError: TEMPLATES.main_2 is not a function, nodexh only reports EXCEPTION: TEMPLATES.main_2 is not a function
  • visually indicate spot of error (e.g. by reversing)
  • fix async stacktraces (probably not yet handled correctly; might be issue with stackman?)
  • consider utf8ize-sourcemaps in case there should be problems w/ 32bit characters
  • truncate long lines in context
  • offer capabilities of NodeXH as API so applications (such as test libraries) can easily retrieve source code, display source lines with contexts

Keywords

FAQs

Package last updated on 17 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc