Last active
September 16, 2018 13:24
-
-
Save arsduo/dc9f41f627b3450eaac5c33c41a3ecea to your computer and use it in GitHub Desktop.
Sanitizing History - example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watchWords: ["MySecretData", "password"], | |
historySanitizer: function(elmObjectOrRecord) { | |
// in 0.18, replace $ with ctor and a with _0 | |
if (elmObjectOrRecord.$ == "MySecretData") { | |
// replace the access token | |
// make sure to return the updated object! | |
return { …elmObjectOrRecord, a: "[FILTERED]" }; | |
}· | |
else { | |
// we have a record, replace the password field | |
return { …elmObjectOrRecord, password: "[FILTERED]" }; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment