I stumbled upon this GitHub project a few days ago. It’s called Superstruct, and it looks like an awesome way to validate data in JavaScript.
Let me explain. You probably want to make sure that you get the kind of data you expect as input in JavaScript, either from your back-end API or validating the data that comes as body in your API. But doing so by hand can be very cumbersome. And I thought adding something like Typescript is a little bit heavy-handed.
Superstruct is a simple but compassable way to validate some object, you can add simple values or more complex validation code. And it throws and error if there is any issues with the data.
Arif Khoja is a Developer. He is a Javascript Enthusiatic who loves logical programming and has first hand experience in building a cutting edge internet product using Angular. He is also an open source freak and keen about learning and sharing. He writes Javascript both frontend and backend. He loves learning and sharing tech all the time. He also has a hands on experience in SEO and writes articles about latest emerging technologies.