index.js
function luiTheme(props) {
	var propsS = (_.isArray(props)) ? props.join('.') : props,
		propsA = (_.isString(props)) ? props.split('.') : props,
		objectVars,
		objectPath = [];

	objectVars = _.result(theme, propsS);

	// If object is already cached in theme, return it
	if (objectVars) {
		return objectVars;

	// Else load it from file
	} else {
		// Find the object fromp build file
		_.each(propsA, function(prop) {
			if (_.result(build, _.union(objectPath, [prop]).join('.')) || (_.includes(_.result(build, objectPath.join('.')), prop))) {
				objectPath.push(prop);
			} else {
				return objectPath;
			}
		});

		loadTheme(objectPath);
		return _.result(theme, propsS);
	}
}
function luiTheme(props) {
	var propsS = (_.isArray(props)) ? props.join('.') : props,
		propsA = (_.isString(props)) ? props.split('.') : props,
		objectVars,
		objectPath = [];

	objectVars = _.result(theme, propsS);

	// If object is already cached in theme, return it
	if (objectVars) {
		return objectVars;

	// Else load it from file
	} else {
		// Find the object fromp build file
		_.each(propsA, function(prop) {
			if (_.result(build, _.union(objectPath, [prop]).join('.')) || (_.includes(_.result(build, objectPath.join('.')), prop))) {
				objectPath.push(prop);
			} else {
				return objectPath;
			}
		});

		loadTheme(objectPath);
		return _.result(theme, propsS);
	}
}
function luiTheme ( props ) { var propsS = ( _ . isArray ( props ) ) ? props . join ( '.' ) : props , propsA = ( _ . isString ( props ) ) ? props . split ( '.' ) : props , objectVars , objectPath = [ ] ; objectVars = _ . result ( theme , propsS ) ; // If object is already cached in theme, return it if ( objectVars ) { return objectVars ; // Else load it from file } else { // Find the object fromp build file _ . each ( propsA , function ( prop ) { if ( _ . result ( build , _ . union ( objectPath , [ prop ] ) . join ( '.' ) ) || ( _ . includes ( _ . result ( build , objectPath . join ( '.' ) ) , prop ) ) ) { objectPath . push ( prop ) ; } else { return objectPath ; } } ) ; loadTheme ( objectPath ) ; return _ . result ( theme , propsS ) ; } }
Retrieves theme variables from cached theme var or from file if need be

@param {String|Array} properties Array or string with a dot separator
@return {Object|String} The theme variable retrieved
Retrieves theme variables from cached theme var or from file if need be