Skip to content
Myr

Misc refactoring to parseParams()

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

authored by visionmedia · committed by visionmedia · parent f6cc2a9 · Browse files · 1 file+5 added−6 removed
This commit

State

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

Diff stats

1 file+5 added−6 removed

  • other:+5 added−6 removed

1 file+5 added−6 removed

modified:lib/express/helpers.js+5 added-6 removed
220 unmodified lines
221 if (parts = key.split('['))222 if (parts.length > 1)223 for (var i = 0, prop = params, len = parts.length; i < len; ++i) {224 var name = parts[i].replace(']', '')225 if (i == len - 1) {226 prop[name] = params[key]227 prop = params, delete params[key]228 }229 else {225 if (i == len - 1)226 prop[name] = params[key],227 prop = params, 228 delete params[key]229 else230 prop = prop[name] = prop[name] || {}231 }231 }232 233 return params234}
16 unmodified lines