workflow.nextcolumnname.md
January 18, 2023 ยท View on GitHub
Home > @datashaper/workflow > nextColumnName
nextColumnName() function
Suggests a new column name given the list passed. If the name is used, this will append numbers to the end. e.g. "column" may result in "column 1" or "column 2" if there are collisions
Signature:
export declare function nextColumnName(name: string, columnNames: string[]): string;
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | the proposed name |
| columnNames | string[] | the existing columnNames for the target table |
Returns:
string