function extractScalePropsFromProps(props, attributes) {
  const result = {};
  Object.keys(props).forEach(key => {
    // this filtering is critical for extracting the correct accessors!
    const attr = attributes.find(a => {
      // width
      const isPlainSet = key.indexOf(a) === 0;
      // Ex: _data
      const isUnderscoreSet = key.indexOf(`_${a}`) === 0;
      // EX: getX
      const usesGet = key.indexOf(`get${toTitleCase(a)}`) === 0;
      return isPlainSet || isUnderscoreSet || usesGet;
    });
    if (!attr) {
      return;
    }
    result[key] = props[key];
  });
  return result;
}
Extract the list of scale properties from the entire props object.
@param {Object} props Props.
@param {Array<String>} attributes Array of attributes for the given
components (for instance, `['x', 'y', 'color']`).
@returns {Object} Collected props.