nodech / error-stack-filter

Error Stack Filter
MIT License
0 stars 0 forks source link

Error Stack Filter

Filter Stack Traces from not useful files, like remove all node_modules files from trace

Usage

ErrorStackFilter ([ignoreFiles, [stackLimit ]])

Example

  var errorStackFilter = require('error-stack-filter')();
  errorStackFilter.setIgnoreFiles([
    path.resolve(__dirname, '/some_file.js'),
    /\/node_modules\//
  ], 10);

this will filter paths where node_modules exist and file __dirname/some_file.js