Skip to content
Myr

accepts now allows multiple args. fixes #117

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Aaron Heckmann · committed by Aaron Heckmann · parent 1879648 · Browse files · 2 files+18 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+18 added−3 removed

  • tests:+12 added−0 removed
  • other:+6 added−3 removed

2 files+18 added−3 removed

modified:lib/express/request.js+6 added-3 removed
121 unmodified lines
122 * @return {bool}123 * @api public124 */125126 accepts: function(path) {127 return this.header('accept') ? 128 this.header('accept').indexOf(mime.type(path)) !== -1 :126 accepts: function() {127 var accept = this.header('accept')128 return accept ? 129 $(arguments).any(function(path){130 return accept.indexOf(mime.type(path)) !== -1131 }) :132 true133 },134135 /**
130 unmodified lines
modified:spec/spec.request.js+12 added