Skip to content

Commit

Permalink
Update description
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWr committed Apr 26, 2024
1 parent 76c8016 commit 0693ec6
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/scriptlets/trusted-replace-outbound-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ import {
* ```
* <!-- markdownlint-enable line-length -->
*
* - `methodPath` — required, the name of the function to trap, it must have an object as an argument
* - `textToReplace` — optional, string or regular expression which should be replaced
* - `replacement` — optional, string which replace the matched text
* - `stack` — optional, string or regular expression that must match the current function call stack trace;
* if regular expression is invalid it will be skipped
* - `logContent` — optional, if set to any value, the original and modified content will be logged
* - `methodPath` — required, the name of the function to trap, it must have an object as an argument.
* Call with only `methodPath` as an argument will log all text content of the specified function to console,
* but only if function call returns a string, otherwise it will log information that content is not a string.
* - `textToReplace` — optional, string or regular expression which should be replaced.
* By default it's set to ''. If it's not set to other value and `logContent` is set, it will log the original content.
* - `replacement` — optional, string which replace the matched text.
* By default it's set to '', so content will not be modified.
* - `stack` — optional, string or regular expression that must match the current function call stack trace.
* If regular expression is invalid it will be skipped.
* - `logContent` — optional, if set to any value, the original and modified content will be logged.
* By default it's set to '' and no content will be logged.
*
* > Logging content may be useful for debugging but it is not allowed for prod versions of filter lists.
*
* ### Examples
*
Expand Down

0 comments on commit 0693ec6

Please sign in to comment.