index.js
function initAndCachePantry(pantryCache, config) {
	return initialize(config)
		.then(function (initializedPantry) {
		// cache the pantry for next time
			pantryCache[config.name] = initializedPantry;
			return initializedPantry;
		});
}
function initAndCachePantry(pantryCache, config) {
	return initialize(config)
		.then(function (initializedPantry) {
		// cache the pantry for next time
			pantryCache[config.name] = initializedPantry;
			return initializedPantry;
		});
}
function initAndCachePantry ( pantryCache , config ) { return initialize ( config ) . then ( function ( initializedPantry ) { // cache the pantry for next time pantryCache [ config . name ] = initializedPantry ; return initializedPantry ; } ) ; }
Proxies to initialize but adds the result to the pantryCache
before returning it.
@param  {Object} pantryCache cache of pantry objects. The result of
initialize will be stored in pantryCache[config.name]
@param  {Object} config      config to be passed to initialize
@return {Promise}            promise for the initialized pantry. Once
resolved pantryCache will contain the initialized pantry.
Proxies to initialize but adds the result to the pantryCache before returning it .