mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
10 lines
202 B
TypeScript
10 lines
202 B
TypeScript
export const splitNumberString = (string?: string, delimiter = ',') => {
|
|
if (!string) {
|
|
return undefined;
|
|
}
|
|
|
|
return string.split(delimiter).map((s: string) => {
|
|
return Number(s);
|
|
});
|
|
};
|