Home > @wixc3/fs-utils > backSlash
Ensure a single heading/trailing backslash (/) of a single line string
Signature:
export declare function backSlash(str: string, type: 'heading' | 'trailing' | 'both' | 'none'): string;
Parameter | Type | Description |
---|---|---|
str | string | |
type | 'heading' \| 'trailing' \| 'both' \| 'none' | 'heading'\|'trailing'\|'both'\|'none' |
Returns:
string