mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
9 lines
138 B
TypeScript
9 lines
138 B
TypeScript
export const isJsonString = (string: string) => {
|
|
try {
|
|
JSON.parse(string);
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
return true;
|
|
};
|