DEV Community

Discussion on: A Dead simple object validator

Collapse
 
anduser96 profile image
Andrei Gatej

I like the idea! But what’s the use case for async/await?

And because I’m quite opinionated, I’d get the array of keys requestObject before iterating over validatingObj, instead of recomputing it in every iteration.

Nonetheless, thank you for sharing!

Collapse
 
droidmakk profile image
Afroze Kabeer Khan. M

It's the opinions that enhances an idea.
As I was doing a map the output was undefined. Later I tried async way got the expected value.