whole_func_string: function isDomainComponent(component) {
    const getRole = (child) => {
      return child && child.type ? child.type.role : "";
    };
    let role = getRole(component);
    if (role === "portal") {
      const children = React.Children.toArray(component.props.children);
      role = children.length ? getRole(children[0]) : "";
    }
    const whitelist = [
      "area",
      "axis",
      "bar",
      "boxplot",
      "candlestick",
      "errorbar",
      "group",
      "line",
      "pie",
      "scatter",
      "stack",
      "voronoi"
    ];
    return includes(whitelist, role);
  }
func_code_string: function isDomainComponent(component) {
    const getRole = (child) => {
      return child && child.type ? child.type.role : "";
    };
    let role = getRole(component);
    if (role === "portal") {
      const children = React.Children.toArray(component.props.children);
      role = children.length ? getRole(children[0]) : "";
    }
    const whitelist = [
      "area",
      "axis",
      "bar",
      "boxplot",
      "candlestick",
      "errorbar",
      "group",
      "line",
      "pie",
      "scatter",
      "stack",
      "voronoi"
    ];
    return includes(whitelist, role);
  }
func_documentation_string: Checks whether a given component can be used to calculate domain
  @param {Component} component: a React component instance
  @returns {Boolean} Returns true if the given component has a role included in the whitelist