File size: 238 Bytes
3f5871c
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
export function parseStringToList(links: unknown): string[] {
	if (typeof links !== "string") {
		throw new Error("Expected a string");
	}

	return links
		.split(",")
		.map((link) => link.trim())
		.filter((link) => link.length > 0);
}