normalizeColumns
Normalize an array of column shorthands to ColumnConfig objects.
normalizeColumns(columns: ColumnShorthand<TRow>[]): ColumnConfig<TRow>[]Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
columns | ColumnShorthand<TRow>[] | Array of column shorthands (strings or ColumnConfig objects) |
Returns
Section titled “Returns”ColumnConfig<TRow>[] - Array of ColumnConfig objects
Example
Section titled “Example”normalizeColumns(['id:number', 'name', { field: 'email', width: 200 }])// Returns:// [// { field: 'id', header: 'ID', type: 'number' },// { field: 'name', header: 'Name' },// { field: 'email', width: 200 }// ]
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt