Recursive validation library with support for objects and lists


Anchor is a javascript library that lets you define strict types.

This makes it really useful for things like:

  • Form validation on the client or server
  • Ensuring compliance with an API
  • Ensuring that the proper arguments were passed into a function or command-line script
  • Validating objects before storing them in a data store
  • Normalizing polymorphic behaviors

Adds support for strongly typed arguments, like, but goes a step further by adding support for array and object sub-validation. It's also the core validation library for the Sails ecosystem.

(Built on top of the great work with

<script type='text/javscript' src="/js/anchor.js"></script>
npm install anchor