code: function discard_callsite(err, matcher){
    // Some JS environments do not have a
    // stack property on error objects.
    // If we are in such an environment
    // just return err as-is.
    if (err.stack) {
      err.stack = err.stack
        .split('\n')
        .filter(function(frame_str){
          return !matcher.test(frame_str);
        })
        .join('\n');
    }
    return err;
  }
docs: /*
  Remove a stack trace