X-Git-Url: https://git.squeep.com/?p=squeep-logger-json-console;a=blobdiff_plain;f=lib%2Fdata-sanitizers.js;fp=lib%2Fdata-sanitizers.js;h=e4d0f3c4bb8238a2d5f5bcd6595440c889139559;hp=0000000000000000000000000000000000000000;hb=229dafe0003708b9fad190b4c0fc68136efd4f8c;hpb=21506cf49b1d239d780b377651554dc868639477 diff --git a/lib/data-sanitizers.js b/lib/data-sanitizers.js new file mode 100644 index 0000000..e4d0f3c --- /dev/null +++ b/lib/data-sanitizers.js @@ -0,0 +1,28 @@ +'use strict'; + +/** + * Here are some sanitizers to replace data fields before logging. + * Well, really, this just documents the expected format. + */ + +/** + * template for sanitizers + * @param {Object} data + * @param {Boolean} sanitize + * @returns {Boolean} + */ +/* istanbul ignore next */ +function _sanitizer(data, sanitize = true) { + let unclean = false; + + if (undefined) { // eslint-disable-line no-constant-condition + unclean = true; + } + if (unclean && sanitize) { + data; + } + + return unclean; +} + +module.exports = {}; \ No newline at end of file