github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/ui/dashboard/src/utils/data.ts (about)

     1  import { LeafNodeDataColumn } from "../components/dashboards/common";
     2  
     3  const getColumn = (
     4    columns: LeafNodeDataColumn[],
     5    name: string
     6  ): LeafNodeDataColumn | undefined => {
     7    if (!columns || !name) {
     8      return undefined;
     9    }
    10  
    11    return columns.find((col) => col.name === name);
    12  };
    13  
    14  export { getColumn };