replace apply by spread syntax (#971)

This commit is contained in:
Thiago Lagden 2017-04-23 20:14:16 -03:00 committed by jongleberry
parent 7f3d0765d7
commit ee5af59f1f
3 changed files with 12 additions and 12 deletions

View file

@ -58,10 +58,10 @@ module.exports = class Application extends Emitter {
* @api public
*/
listen() {
listen(...args) {
debug('listen');
const server = http.createServer(this.callback());
return server.listen.apply(server, arguments);
return server.listen(...args);
}
/**

View file

@ -87,8 +87,8 @@ const proto = module.exports = {
* @api public
*/
throw() {
throw createError.apply(null, arguments);
throw(...args) {
throw createError(...args);
},
/**

View file

@ -460,8 +460,8 @@ module.exports = {
* @api public
*/
accepts() {
return this.accept.types.apply(this.accept, arguments);
accepts(...args) {
return this.accept.types(...args);
},
/**
@ -477,8 +477,8 @@ module.exports = {
* @api public
*/
acceptsEncodings() {
return this.accept.encodings.apply(this.accept, arguments);
acceptsEncodings(...args) {
return this.accept.encodings(...args);
},
/**
@ -494,8 +494,8 @@ module.exports = {
* @api public
*/
acceptsCharsets() {
return this.accept.charsets.apply(this.accept, arguments);
acceptsCharsets(...args) {
return this.accept.charsets(...args);
},
/**
@ -511,8 +511,8 @@ module.exports = {
* @api public
*/
acceptsLanguages() {
return this.accept.languages.apply(this.accept, arguments);
acceptsLanguages(...args) {
return this.accept.languages(...args);
},
/**