docs: function getMiddlePaths(paths, ext, new_ext) {
  
  	if (Array.isArray(paths)) {
  		return paths.map(function eachEntry(entry) {
  			return getMiddlePaths(entry, ext, new_ext);
  		});
  	}
  
  	if (ext && new_ext) {
  		paths = paths.replace(ext, new_ext);
  	}
  
  	return paths;
  }