function createInterpolationFromStringOutputRange(config) {
  var outputRange = config.outputRange;
  invariant(outputRange.length >= 2, 'Bad output range');
  outputRange = outputRange.map(colorToRgba);
  checkPattern(outputRange);

  // ['rgba(0, 100, 200, 0)', 'rgba(50, 150, 250, 0.5)']
  // ->
  // [
  //   [0, 50],
  //   [100, 150],
  //   [200, 250],
  //   [0, 0.5],
  // ]
  /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to
   * guard against this possibility.
   */
  var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
    return [];
  });
  outputRange.forEach(function (value) {
    /* $FlowFixMe(>=0.18.0): `value.match()` can return `null`. Need to guard
     * against this possibility.
     */
    value.match(stringShapeRegex).forEach(function (number, i) {
      outputRanges[i].push(+number);
    });
  });

  /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to
   * guard against this possibility.
   */
  var interpolations = outputRange[0].match(stringShapeRegex).map(function (value, i) {
    return Interpolation.create(_extends({}, config, {
      outputRange: outputRanges[i]
    }));
  });

  return function (input) {
    var i = 0;
    // 'rgba(0, 100, 200, 0)'
    // ->
    // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'
    return outputRange[0].replace(stringShapeRegex, function () {
      return String(interpolations[i++](input));
    });
  };
}
/**
 * Supports string shapes by extracting numbers so new values can be computed,
 * and recombines those values into new strings of the same shape.  Supports
 * things like:
 *
 *   rgba(123, 42, 99, 0.36) // colors
 *   -45deg                  // values with units
 */
Supports string shapes by extracting numbers so new values can be computed,
and recombines those values into new strings of the same shape.  Supports
things like.


Supports string shapes by extracting numbers so new values can be computed and recombines those values into new strings of the same shape . Supports things like .
function createInterpolationFromStringOutputRange(config) {
  var outputRange = config.outputRange;
  invariant(outputRange.length >= 2, 'Bad output range');
  outputRange = outputRange.map(colorToRgba);
  checkPattern(outputRange);
  var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
    return [];
  });
  outputRange.forEach(function (value) {
    value.match(stringShapeRegex).forEach(function (number, i) {
      outputRanges[i].push(+number);
    });
  });
  var interpolations = outputRange[0].match(stringShapeRegex).map(function (value, i) {
    return Interpolation.create(_extends({}, config, {
      outputRange: outputRanges[i]
    }));
  });
  return function (input) {
    var i = 0;
    return outputRange[0].replace(stringShapeRegex, function () {
      return String(interpolations[i++](input));
    });
  };
}
function createInterpolationFromStringOutputRange ( config ) { var outputRange = config . outputRange ; invariant ( outputRange . length >= 2 , 'Bad output range' ) ; outputRange = outputRange . map ( colorToRgba ) ; checkPattern ( outputRange ) ; var outputRanges = outputRange [ 0 ] . match ( stringShapeRegex ) . map ( function ( ) { return [ ] ; } ) ; outputRange . forEach ( function ( value ) { value . match ( stringShapeRegex ) . forEach ( function ( number , i ) { outputRanges [ i ] . push ( + number ) ; } ) ; } ) ; var interpolations = outputRange [ 0 ] . match ( stringShapeRegex ) . map ( function ( value , i ) { return Interpolation . create ( _extends ( { } , config , { outputRange : outputRanges [ i ] } ) ) ; } ) ; return function ( input ) { var i = 0 ; return outputRange [ 0 ] . replace ( stringShapeRegex , function ( ) { return String ( interpolations [ i ++ ] ( input ) ) ; } ) ; } ; }
Supports string shapes by extracting numbers so new values can be computed,
 and recombines those values into new strings of the same shape.
Supports string shapes by extracting numbers so new values can be computed and recombines those values into new strings of the same shape .
// ['rgba(0, 100, 200, 0)', 'rgba(50, 150, 250, 0.5)'] // -> // [ //   [0, 50], //   [100, 150], //   [200, 250], //   [0, 0.5], // ] /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to
   * guard against this possibility.
   */ /* $FlowFixMe(>=0.18.0): `value.match()` can return `null`. Need to guard
     * against this possibility.
     */ /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to
   * guard against this possibility.
   */ // 'rgba(0, 100, 200, 0)' // -> // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'