Skip to content
Myr

throw when callback is not given to app.engine()

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

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent ba413ee · Browse files · 2 files+9 added−1 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+9 added−1 removed

  • tests:+8 added−1 removed
  • other:+1 added−0 removed

2 files+9 added−1 removed

modified:lib/application.js+1 added
204 unmodified lines
205 * @api public206 */207208app.engine = function(ext, fn){209 if ('function' != typeof fn) throw new Error('callback function required');210 if ('.' != ext[0]) ext = '.' + ext;211 this.engines[ext] = fn;212 return this;213};
320 unmodified lines
modified:test/app.engine.js+8 added-1 removed