ecmaDebug: DbC in JavaScript
ecmaDebug is a Design by Contract tool for Javascript
It includes a custom NS_ASSERTION firing function for debugging purposes when Venkman isn’t enough.
toString and toSource have been redirected to the contract’s body to see what the function is really supposed to do. Additionally, a toContractSource() and toContractString() functions deliver the whole contract object in source and string form, respectively.
link






