A simple implementation of a JavaScript assertion