Skip to content
Myr

Fix res.jsonp(obj, status) deprecation message

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

closes #4155

authored by Kim · committed by Douglas Christopher Wilson · parent 353348a · Browse files · 2 files+3 added−2 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+3 added−2 removed

  • other:+3 added−2 removed

2 files+3 added−2 removed

modified:lib/response.js+2 added-2 removed
282 unmodified lines
283 var val = obj;284285 // allow status / body286 if (arguments.length === 2) {287 // res.json(body, status) backwards compat287 // res.jsonp(body, status) backwards compat288 if (typeof arguments[1] === 'number') {289 deprecate('res.jsonp(obj, status): Use res.status(status).json(obj) instead');289 deprecate('res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead');290 this.statusCode = arguments[1];291 } else {292 deprecate('res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead');293 this.statusCode = arguments[0];
849 unmodified lines
modified:History.md+1 added
1unreleased2==========34 * Fix `res.jsonp(obj, status)` deprecation message5 * Fix typo in `res.is` JSDoc6 * deps: proxy-addr@~2.0.67 - deps: ipaddr.js@1.9.18
3477 unmodified lines