title: Should we validate method arguments in JavaScript API's?
body: <p>I'm developing a JavaScript library that will be used by 3rd party developers.
  The API includes methods with this signature:</p>
  
  <p>function doSomething(arg1, arg2, options)</p>
  
  <ul>
  <li>arg1, arg2 are 'required' simple type arguments.</li>
  <li>options is a hash object containing optional arguments.</li>
  </ul>
  
  <p>Would you recommend to validate that:
  - argument types are valid? 
  - options attributes are correct? For example: that the developer didn't pass by mistake onSucces instead of onSuccess?</p>
  
  <ul>
  <li>why do popular libraries like prototype.js do not validate?</li>
  </ul>