title: Is there a code contract library for JavaScript?
body: <p>There are lots of <em>form validation</em> libraries and jQuery plugins. Though I cannot find a <em>code contract</em> library, for validating function arguments.</p>
  
  <p>As an example, to do contract validation in .NET, you could use the outstanding <a href="http://conditions.codeplex.com/" rel="nofollow">Conditions library</a>. I'm looking for something similar for JavaScript. The closest I can find is <a href="https://github.com/ecavazos/speks" rel="nofollow">Speks</a>, but its for Node.js and is geared for testing, whereas I need to bake the validation into release code.</p>
  
  <p>Examples of validation methods I need: checks for null, empty, isstring, isnumber, length, min, max, value, less than, greater than, between, not equal, not less than, not greater than, etc.</p>