Download ADOOR_ACE/node_modules/chpr-logger/streams/sensitive-data.js from thisisAce/adoor-store: direct link, hf CLI and curl.
- Browser
- Download file 469 Bytes
-
https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/chpr-logger/streams/sensitive-data.js
- Command line
-
hf download hf://thisisAce/adoor-store/ADOOR_ACE/node_modules/chpr-logger/streams/sensitive-data.js
-
curl -L -o sensitive-data.js https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/chpr-logger/streams/sensitive-data.js
469 Bytes
| ; | |
| const DEFAULT_SENSITIVE_DATA_FRAGMENTS = | |
| '(mdp|password|authorization|token|pwd|auth)'; | |
| module.exports = class SensitiveDataStream { | |
| constructor(fragments) { | |
| this.fragments = fragments || DEFAULT_SENSITIVE_DATA_FRAGMENTS; | |
| this.pattern = new RegExp(`"${this.fragments}":"([^"]*)"`, 'ig'); | |
| } | |
| write(input) { | |
| const sanitized = input.replace(this.pattern, '"$1":"__SENSITIVE_DATA__"'); | |
| return process.stdout.write(sanitized); | |
| } | |
| }; | |