title: NodeJS function parameter checking with assertions
body: <p>NodeJS' dynamic typing is fun and all but given a function I'd like to get some feedback during development whether what I'm passing is in fact going to produce anything meaningful.</p>
  
  <p>In C# I would do: <code>Debug.Assert(complexType.Title.length &lt;= 10)</code> (such statements would not be included when compiled in release mode)</p>
  
  <p>I found that for example Chai could do exactly this. However this is a BDD / TDD framework and I plan on putting this in production code, not in tests.</p>
  
  <pre><code>function doSomething(complexType) {
      expect(complexType.title).to.be.a('string');
  }
  </code></pre>
  
  <p>I read that this could be compiled out with Uglify to more closely reflect <code>Debug.Assert</code> behaviour.</p>
  
  <p>Is this a good idea? Or does NodeJS have 'real' assertions?</p>