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

Data masking: Parse, not only Validate #17

Open
theKashey opened this issue Sep 3, 2023 · 0 comments
Open

Data masking: Parse, not only Validate #17

theKashey opened this issue Sep 3, 2023 · 0 comments

Comments

@theKashey
Copy link

Briant library! Replaced zod in a couple of minutes and greatly reduced bundle size.

The only one moment is missing a little bit - "data masking"

  • with zod if you declare object with a given shape
    • then on z.parse you will get only the fields you've requested
  • lizod just checks that the object matches expectations
    • so you always operate with the real object

There is not a big problem to do data masking, however information about "selected fields" is hidden inside $object. So step 1 is to provide access to this information.

What do you think about extra helper to extract the configuration from $object, it can be just a property on a return function as well(example), to provide runtime access to fields to be picked for the external tool?

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