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 f4a9d7e · Browse files · 5 files·+10 added−11 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+10 added−11 removed
- other:+10 added−11 removed
Provenance
- Commit
0894cfe- Tree
c89f389- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent
f4a9d7e
5 files changed+10 added−11 removed
modified:examples/upload/app.js+3 added-4 removed
24 unmodified lines252627282930293032333132333435368 unmodified lines24 unmodified lines })})
post('/upload', function(){ var self = this; $(this.param('images')).each(function(image){ this.param('images').each(function(image){ puts(image.filename + ' -> ' + image.tempfile) self.flash('info', 'Uploaded ' + image.filename) }) this.flash('info', 'Uploaded ' + image.filename) }, this) this.redirect('/upload')})
get('/public/*', function(file){8 unmodified linesmodified:lib/express/pages/show-exceptions.js+3 added-3 removed
11 unmodified lines1213141516161718192010 unmodified lines31323334353635363738394038 unmodified lines11 unmodified lines */
function stack(e) { if (e.stack) return $(e.stack.split('\n').slice(1)).map(function(val, i){ return e.stack.split('\n').slice(1).map(function(val, i){ if (!i) return '<li>' + val.replace(/^(.*?):/, '<span class="path">$1</span>:') + '</li>' return '<li>' + val .replace(/\(([^:]+)/, '(<span class="path">$1</span>')10 unmodified lines * @api private */
function hash(hash) { if (!$(hash).length()) return '<tr><td class="empty" colspan="2">Empty</td></tr>' return $(hash).map(function(val, key){ if (!hash || !hash.values.length) return '<tr><td class="empty" colspan="2">Empty</td></tr>' return hash.map(function(val, key){ return '<tr><td>' + key + ':</td><td>' + JSON.encode(val) + '</td></tr>' }).join('\n')}
38 unmodified linesmodified:lib/express/plugins/session.js+1 added-1 removed
116 unmodified lines117 * @api public118 */119 120 length: function() {121- return $(this.store).length()121+ return this.store.values.length122 },123 124 /**125 * Reap sessions older than _ms_.80 unmodified linesmodified:lib/express/dsl.js+1 added-1 removed
78 unmodified lines79 */80 81 exports.run = function() {82 configure(Express.environment = process.ENV.EXPRESS_ENV || 'development')83- $(Express.plugins).each(function(plugin){83+ Express.plugins.each(function(plugin){84 if ('init' in plugin.klass)85 plugin.klass.init(plugin.options)86 })87 Express.server.run.apply(Express.server, arguments)46 unmodified linesmodified:lib/express/utils.js+2 added-2 removed
116 unmodified lines117 exports.mergeParam = function(key, val, params) {118 var orig = params,119 keys = key.trim().match(/\w+/g),120 array = /\[\]$/.test(key)121- $(keys).reduce(queryString.parseQuery(key), function(parts, key, i){121+ keys.reduce(function(parts, key, i){122 if (i === keys.length - 1)123 if (key in params)124 params[key] instanceof Array ?125 params[key].push(val) :2 unmodified lines128 params[key] = array ? [val] : val129 if (!(key in params)) params[key] = {}130 params = params[key]131 return parts[key]132- })132+ }, queryString.parseQuery(key))133 return orig134 }135 136 /**73 unmodified lines