New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clarify

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clarify

Remove nodecore related stack trace noice

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
increased by6.38%
Maintainers
1
Weekly downloads
 
Created
Source

#clarify

Remove nodecore related stack trace noice

Installation

npm install clarify

Disclaimer

This has not yet been tested extensively!

Example

The following script produce an error:

require('clarify');

throw new Error("custom error");

Without the trace the error output is:

/Users/Andreas/Sites/node_modules/clarify/test.js:2
throw new Error("test");
      ^
Error: test
    at Object.<anonymous> (/Users/Andreas/Sites/node_modules/clarify/test.js:2:7)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

With the clarify the error output is:

/Users/Andreas/Sites/node_modules/clarify/test.js:2
throw new Error("test");
      ^
Error: test
    at Object.<anonymous> (/Users/Andreas/Sites/node_modules/clarify/test.js:2:7)

API documentation

To active require clarify.

  require('clarify');

Long stack traces

If you want super long stack traces use trace. Just make sure to put clarify before trace.

require('clarify');
require('trace');

var fs = require('fs');

// There is no limit for the size of the stack trace
Error.stackTraceLimit = Infinity;

setTimeout(function () {
  fs.readFile(__filename, function () {
    process.nextTick(function () {
      throw new Error("custom error");
    });
  });
}, 200);

throw the following output:

/Users/Andreas/Sites/node_modules/trace/test.js:14
      throw new Error("test");
            ^
Error: test
    at /Users/Andreas/Sites/node_modules/trace/test.js:14:13
    at /Users/Andreas/Sites/node_modules/trace/test.js:13:13
    at Object.<anonymous> (/Users/Andreas/Sites/node_modules/trace/test.js:12:6)
    at Object.<anonymous> (/Users/Andreas/Sites/node_modules/trace/test.js:11:1)

Keywords

FAQs

Package last updated on 29 Sep 2012

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