dbc is a small library for design-by-contract defensive coding in javascript.
It focuses especially on type assertions in an attempt to provide a small compensation for JavaScript's unfortunate dynamicness. Some of the ideas were borrowed from ristretto-js.
The core features are:
validate values against a specification
generate type constructors from a specification
runtime validation of function arguments and return value (via the wrap combinator)