Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 192 Bytes

File metadata and controls

14 lines (12 loc) · 192 Bytes

JSON

  • Check if JSON string is valid
const isValidJSON = (value: string) => {
  try {
    JSON.parse(value);
    return true;
  } catch (error) {
    return false;
  }
}