diff --git a/lib/request.js b/lib/request.js index 7c27901..48c7b6a 100644 --- a/lib/request.js +++ b/lib/request.js @@ -259,8 +259,8 @@ module.exports = { */ get idempotent() { - var idempotents = ['GET','HEAD','PUT','DELETE','OPTIONS','TRACE']; - return idempotents.indexOf(this.method) !== -1; + var methods = ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE']; + return ~methods.indexOf(this.method); }, /**