Replace the username and password in input, a URL, with mask.
input
mask
redactCredentialsInURL('https://user:pass@example.com'); // 'https://REDACTED:REDACTED@example.com/' Copy
redactCredentialsInURL('https://user:pass@example.com'); // 'https://REDACTED:REDACTED@example.com/'
Replace the username and password in
input, a URL, withmask.