Superstruct – Simple & Composable Way to Validate Data in Javascript

samuel Validation 31 , , , ,

Superstruct makes it easy to define interfaces and then validate JavaScript data against them. It’s type annotation API was inspired by Typescript, Flow, Go, and GraphQL, giving it a familiar and easy to understand API.

But Superstruct is designed for validating data at runtime, so it throws detailed runtime errors for you or your end users. This is especially useful in situations like accepting arbitrary input in a REST or GraphQL API. But it can even be used to validate internal data structures at runtime when needed.

Go