lib/resolver/gradient/linear.js
function(gradient) {
			// cut out all redundant data
			if (this.isLinearGradient(gradient)) {
				gradient = gradient.replace(/^\s*[\-a-z]+\s*\(|\)\s*$/ig, '');
			} else {
				throw 'Invalid linear gradient definition:\n' + gradient;
			}

			return new LinearGradient(gradient);
		}
function(gradient) {
			// cut out all redundant data
			if (this.isLinearGradient(gradient)) {
				gradient = gradient.replace(/^\s*[\-a-z]+\s*\(|\)\s*$/ig, '');
			} else {
				throw 'Invalid linear gradient definition:\n' + gradient;
			}

			return new LinearGradient(gradient);
		}
function ( gradient ) { // cut out all redundant data if ( this . isLinearGradient ( gradient ) ) { gradient = gradient . replace ( / ^\s*[\-a-z]+\s*\(|\)\s*$ / ig , '' ) ; } else { throw 'Invalid linear gradient definition:\n' + gradient ; } return new LinearGradient ( gradient ) ; }
Parses gradient definition into an object.
This object can be used to transform gradient into various
forms
@param  {String} gradient Gradient definition
@return {LinearGradient}
Parses gradient definition into an object . This object can be used to transform gradient into various forms