Design by Contract implementation in Javascript.