mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-19 22:19:36 +02:00
fix: min indent spaces set to 1 (thrown error when 0)
This commit is contained in:
@@ -6,6 +6,9 @@ function toYaml(
|
||||
input: Record<string, string>[] | string[][],
|
||||
indentSpaces: number = 2
|
||||
): string {
|
||||
if (indentSpaces == 0) {
|
||||
throw new Error('Indent spaces must be greater than zero');
|
||||
}
|
||||
const indent = ' '.repeat(indentSpaces);
|
||||
|
||||
if (
|
||||
|
Reference in New Issue
Block a user