lorenwest/node-config — pull request #165 by markstos (2014-11-14 15:40:10+00:00)
Title: Simplify the definition of defer() functions.

Before: you had to pass in the config object:

before: defer(function (cfg) {
return "Welcome to "+cfg.siteTitle;
}),

After: 'this' is now bound to the main config object, so it doesn't have to be
passed in:

after: defer(function () {
return "Welcome to "+this.siteTitle;
}),

For backwards-compatibility, the config object is also still passed in as an
argument.
(Although it's unlikely that anyone started using this feature, since it has
only been for a few hours, and not well-documented for most of that time).

Automated tests are included to check this works.