Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hydro-clean-stacks

hydrojs97MIT0.2.0

Remove hydro entires from error stacks

hydroplugin, hydro, clean stacks

readme

NPM version Build Status Coverage Status

hydro-clean-stacks

Synopsis

Remove hydro entires from error stacks

Usage

Config:

hydro.set({
  plugins: ['hydro-clean-stacks'],
  'clean-stacks': true
});

CLI:

$ hydro --clean-stacks

Before:

Error: test
    at Object.<anonymous> (/Users/vesln/Code/hydro-clean-stacks/test/fixtures/1.js:2:9)
    at SyncTest.exec (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/lib/hydro/test/sync.js:32:13)
    at /Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/lib/hydro/test/base.js:105:10
    at EventEmitter.emit (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/node_modules/evts/lib/evts.js:46:26)
    at Base.run (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/lib/hydro/test/base.js:101:11)
    at next (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/lib/hydro/suite/index.js:58:52)
    at EventEmitter.emit (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/node_modules/evts/lib/evts.js:46:26)
    at Suite.run (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/lib/hydro/suite/index.js:62:11)
    at next (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/lib/hydro/suite/index.js:58:52)
    at EventEmitter.emit (/Users/vesln/Code/hydro-clean-stacks/node_modules/hydro/node_modules/evts/lib/evts.js:46:26)

After:

Error: test
    at Object.<anonymous> (/Users/vesln/Code/hydro-clean-stacks/test/fixtures/1.js:2:9)

Installation

npm:

npm install hydro-clean-stacks

Tests

$ npm test

Coverage:

$ npm run coverage

License

The MIT License (see LICENSE)

changelog

0.2.0 / 2014-01-07

  • Store the original stack
  • Ignore chai.js stack entires by default
  • Support custom ignore patterns

0.1.0 / 2014-01-02

  • API breaking: Enable by default

0.0.2 / 2013-12-22

  • Handle errors without a stack
  • "clean-stacks" becomes "cleanStacks" in latest hydro

0.0.1 / 2013-12-14

  • Initial implementation