npm.io
3.1.1 • Published 9 months ago

specma

Licence
ISC
Version
3.1.1
Deps
0
Vulns
0
Weekly
0

Specma

Simple, reusable and composable validation

Specma is a Javascript library to validate any type of value against a simple, reusable and composable spec.

  • Collection specs defined with the exact same shape as the value!
  • Based on predicate functions of type true || "reason"
  • Composable specs with intuitive and/or operators
  • Easy cross-validation between multiple fields
  • User defined customized invalid reasons
  • Async validation out of the box
  • Very small footprint

View complete documentation

Keywords