// NOT OK
const filter = new SensitiveParamFilter()
console.log(
filter.filter([
"map test",
new Map([
["Password", 143534],
["345", 2],
]),
]),
)
// Output: [ 'map test', {} ]
// NOT OK
console.log(filter.filter(["set test", new Set(["123", "Password"])]))
// Output: [ 'set test', {} ]
// OK
console.log(filter.filter(["array test", ["123", "Password"]]))
// Output: [ 'array test', [ '123', 'Password' ] ]
// OK
console.log(
filter.filter([
"object from map test",
Object.fromEntries(
new Map([
["Password", 134545],
["345", 2],
]),
),
]),
)
// OUTPUT: [ 'object from map test', { '345': 2, Password: 'FILTERED' } ]