code: function toNewName(scale) {
    // d3 scale changed the naming scheme for scale from "linear" -> "scaleLinear" etc.
    const capitalize = (s) => s && s[0].toUpperCase() + s.slice(1);
    return `scale${capitalize(scale)}`;
  }
docs: Private Functions