Skip to content

Commit

Permalink
If Http does not has methods declared the default ones are returned
Browse files Browse the repository at this point in the history
  • Loading branch information
ardiadrianadri committed Jan 16, 2019
1 parent 90dd6f9 commit cdf1693
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ module.exports = getCurrentNodeMethods() || getBasicNodeMethods()
*/

function getCurrentNodeMethods () {
return http.METHODS && http.METHODS.map(function lowerCaseMethod (method) {
const methods = http.METHODS && http.METHODS.map(function lowerCaseMethod (method) {
return method.toLowerCase()
})
});

return methods;
}

/**
Expand Down

0 comments on commit cdf1693

Please sign in to comment.