From 61b587e6817065799c63561186502a0abb185221 Mon Sep 17 00:00:00 2001 From: Artem Derevnjuk Date: Wed, 1 Feb 2023 17:32:45 +0400 Subject: [PATCH] docs(readme): improve the usage example of transform option closes #174 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e7c4e2f..4ff12d3 100644 --- a/README.md +++ b/README.md @@ -256,18 +256,18 @@ Here's a simple example of what the `remove-sensitive-data.ts` module might look ```ts import { Entry } from 'har-format'; -const PASSWORD_REGEXP = /\"password":.*?(?=,)/g; +const PASSWORD_REGEXP = /"password":.*?(?=,)/g; export default async (entry: Entry) => { try { // Remove sensitive information from the request and response bodies entry.request.postData.text = entry.request.postData.text.replace( PASSWORD_REGEXP, - `"password": "***"` + `"password":"***"` ); entry.response.content.text = entry.response.content.text.replace( PASSWORD_REGEXP, - `"password": "***"` + `"password":"***"` ); return entry; } catch {