Contract library for JavaScript