davidmarkclements / fast-redact

very fast object redaction
MIT License
286 stars 30 forks source link

Support multiple wildcards #27

Open JohnLKramer opened 4 years ago

JohnLKramer commented 4 years ago

Because only one wildcard per path is supported, there is no way to redact anything inside a doubly nested array.

E.g. in the following object, you can redact anything underneath tokens unless you redact everything underneath tokens:

{ creditcards: [ { amount: 0, tokens: [ { tokenValue: 'string', tokenType: 'string', cardType: 'string', expDate: 'string', cardHolderName: 'string', lastFour: 'string', }, ], }, ], }

Unless I am missing something. Would be great to support.

mcollina commented 4 years ago

Would you like to send a Pull Request to address this issue? Remember to add unit tests.

JohnLKramer commented 4 years ago

I hope to have time to work on it.

champagnetony commented 3 years ago

I created a branch and have been working on this. It's mostly done but it needs some additional tests and I have not been able to check the groupRestore. Unfortunately, I cannot create the branch on origin. I can send over a patch or if you can grant me permissions I can create the branch on origin and push the changes that way. Let me know. Thank you.

champagnetony commented 3 years ago

fast-redact-issue-27-patch.txt

Feel free to change it up, rework it etc. Let me know if you have any questions. Thank you!

mcollina commented 3 years ago

Please open a PR on github, you need to create your own fork.

arealmaas commented 2 years ago

Any progress here? :)