From 47b5698218b37b246f0c97f173abeb0062525d4f Mon Sep 17 00:00:00 2001 From: Chris Tavares Date: Thu, 22 May 2014 21:42:19 -0700 Subject: [PATCH] Return this from customize for chaining. --- lib/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index f13b34a..3d27447 100644 --- a/lib/index.js +++ b/lib/index.js @@ -57,7 +57,7 @@ function Config(parent, defaultEnvVar, initialCustomizer) { }; config.customize = function (newCustomizer) { - newCustomizer(config); + newCustomizer(this); if (!customizer) { customizer = newCustomizer; } else { @@ -72,6 +72,8 @@ function Config(parent, defaultEnvVar, initialCustomizer) { Object.keys(environments).forEach(function (envName) { environments[envName].customize(newCustomizer); }); + + return this; }; config.set = function (setting, value) {