Optional
excludeBlock-list of matchers. If a frame matches any of these, it is removed.
Optional
includeAllow-list of matchers. If provided, a frame must match at least one entry here to be kept.
Optional
presetConvenience defaults for common use-cases:
'app-only'
: Excludes node_modules
, bundlers (e.g. webpack), internal frames,
<anonymous>
, and native
. Best for user-facing stack displays.'all'
: No additional defaults; only include
/exclude
determine results.'minimal'
: Excludes only node_modules
and <anonymous>
.
Utilities for filtering parsed stack frames.
Remarks
This module exposes a flexible
filterStack
function that lets you:node_modules
, bundlers, internals).The filtering logic supports both regular expressions (tested against
frame.fileName
) and predicate functions that receive the fullStackFrame
.Example