lorenwest/node-config — pull request #151 by jaylynch (2014-10-20 16:58:42+00:00)
Title: Allow property accessors in configuration

'Getters' / accessor properties being defined in .js configuration files were being flattened to static values on load, causing some issues for use cases where you want to allow dynamic generation of a large set of items based on core values which change per environment.

(eg. Our use case is an array of URLs, these are all 'config.url.api', 'config.url.web', etc. with each defined as a get() which references a 'config.domain' value to build part of the URL - the suffixes do not change for environments but the domain does)

Test and extend method come with thanks to: http://ejohn.org/blog/javascript-getters-and-setters/