Implement equals for NumberRange in JavaScript.