Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata #242

Open
mfulton26 opened this issue Aug 4, 2022 · 0 comments
Open

metadata #242

mfulton26 opened this issue Aug 4, 2022 · 0 comments

Comments

@mfulton26
Copy link

mfulton26 commented Aug 4, 2022

In addition to validating values I want to identify and redact, remove, or otherwise scrub personally identifiable information (PII) from objects when logging.

I can create my own object hierarchy to point to which values in my objects are PII but it feels repetitive to me. If I could instead define custom properties on Ow predicates and then introspect them when logging then I would be able to programmatically redact/remove/scrub properties accordingly.

I suspect there are other use cases for metadata too but this is my current one.

Maybe this is already somewhat possible by me using my own ES6 Symbols to add properties to predicates but I still need a way to introspect nested predicates, etc. I'll also need to figure out the TypeScript augmentations to play nice if I add my own properties via symbols.

Now that I've written this up I'm wondering if augmenting Ow myself is the way to go or if adding metadata to Ow predicates is still a feature worth exploring. I would appreciate some advise/perspective here. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant