Removed more Collection usage
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by visionmedia · committed by visionmedia · parent 593634f · Browse files · 4 files·+13 added−12 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+13 added−12 removed
- other:+13 added−12 removed
Provenance
- Commit
f4a9d7e- Tree
f1572a2- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent
593634f
4 files changed+13 added−12 removed
modified:lib/express/plugins/hooks.js+2 added-2 removed
47 unmodified lines4849505152525354555657585960616262636465666747 unmodified lines * Invoke all before handlers. */ request: function(event) { $(exports.callbacks.before).each(function(fn){ exports.callbacks.before.each(function(fn){ fn.call(event.request, event.request) }) }, /** * Invoke all after handlers. */ response: function(event) { $(exports.callbacks.after).each(function(fn){ exports.callbacks.after.each(function(fn){ fn.call(event.request, event.request) }) } }})modified:lib/express/plugins/session.js+1 added-1 removed
129 unmodified lines130 131 reap: function(ms) {132 var self = this,133 threshold = Number(new Date(Number(new Date) - ms))134- $(this.store).each(function(session, sid){134+ this.store.each(function(session, sid){135 if (session.lastAccess < threshold)136 self.destroy(sid)137 })138 }67 unmodified linesmodified:lib/express/plugins.js+2 added-1 removed
1233456785 unmodified lines
// Express - Plugins - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
var utils = require('express/utils');var utils = require('express/utils')utils.mixin(require('express/plugins/hooks'))utils.mixin(require('express/plugins/flash'))utils.mixin(require('express/plugins/cache'))utils.mixin(require('express/plugins/cookie'))5 unmodified linesmodified:lib/express/request.js+8 added-8 removed
71 unmodified lines72 this.params = this.params || {}73 this.params.path = {}74 this.params.get = this.url.query ? queryString.parseQuery(this.url.query) : {}75 this.params.post = this.params.post || {}76- this.plugins = $(Express.plugins).map(function(plugin){76+ this.plugins = Express.plugins.map(function(plugin){77 return new plugin.klass(plugin.options) 78 })79 },80 51 unmodified lines132 */133 134 accepts: function() {135 var accept = this.header('accept')136- return accept ? 137- $(arguments).any(function(path){138- var type = mime.type(path)139- return accept.indexOf(type) !== -1 ||140- accept.indexOf(type.split('/')[0]+'/*') !== -1141- }) :142- true136+ return accept 137+ ? arguments.any(function(path){138+ var type = mime.type(path)139+ return accept.indexOf(type) !== -1 ||140+ accept.indexOf(type.split('/')[0]+'/*') !== -1141+ })142+ : true143 },144 145 /**146 * Set response status to _code_.129 unmodified lines