A declarative way to specify and enforce preconditions and postconditions for method execution in javascript