stacktracey
Advanced tools
Comparing version 1.0.29 to 1.0.30
{ | ||
"name": "stacktracey", | ||
"version": "1.0.29", | ||
"version": "1.0.30", | ||
"description": "Parses call stacks, reads sources and meta-information.", | ||
@@ -5,0 +5,0 @@ "main": "stacktracey", |
@@ -108,6 +108,6 @@ # StackTracey | ||
You can override `isThirdParty` behaviour by replacing the predicate implementation: | ||
You can add exceptions to the `isThirdParty` predicate: | ||
```javascript | ||
StackTracey.isThirdParty = path => path.includes ('jquery') | ||
StackTracey.isThirdParty.except (path => path.includes ('jquery')) // jquery paths won't be marked as thirdParty | ||
``` | ||
@@ -114,0 +114,0 @@ |
@@ -168,2 +168,13 @@ "use strict"; | ||
/* Chaining helper for .isThirdParty | ||
------------------------------------------------------------------------ */ | ||
StackTracey.isThirdParty.except = pred => { | ||
const impl = StackTracey.isThirdParty | ||
StackTracey.isThirdParty = path => impl (path) && !pred (path) | ||
StackTracey.isThirdParty.except = impl.except | ||
} | ||
/* Array methods | ||
@@ -170,0 +181,0 @@ ------------------------------------------------------------------------ */ |
20414
268