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 * @api public
*/ */
listen() { listen(...args) {
debug('listen'); debug('listen');
const server = http.createServer(this.callback()); 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 * @api public
*/ */
throw() { throw(...args) {
throw createError.apply(null, arguments); throw createError(...args);
}, },
/** /**

View file

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