Skip to content
Myr

contentsOf() throws exception when not function

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

authored by visionmedia · committed by visionmedia · parent a21fb6c · Browse files · 1 file+1 added−0 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+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:lib/express.core.js+1 added
414 unmodified lines
415 * @api public416 */417 418 contentsOf : function(body) {419 if (typeof body != 'function') throw "Express.contentsOf(): `" + body + "' is not a function"420 return body.toString().match(/^[^\{]*{((.*\n*)*)}/m)[1]421 },422 423 /**
177 unmodified lines