11 lines
316 B
TypeScript
Raw Normal View History

2024-05-23 16:09:06 -03:00
// Helper function for nullable input fields into an array of strings
export function determineFlakeDirectories(input: string): string[] {
const sepChar = /\s+/;
const trimmed = input.trim();
if (trimmed === "") {
return [];
} else {
return trimmed.split(sepChar).map((s: string) => s.trim());
}
}