반응형
    
    
    
  const isJson = (str: string) => {
  try {
    const json = JSON.parse(str);
    return json && typeof json === 'object';
  } catch (e) {
    return false;
  }
};반응형
    
    
    
  '웹프로그래밍 > Javascript' 카테고리의 다른 글
| kakao.maps.LatLng is not a constructor (0) | 2023.12.28 | 
|---|---|
| window.open 새로운 윈도우 창에 post 로 보내기 (0) | 2022.05.31 | 
| get only text by clipboard (0) | 2020.07.08 | 
| get Image width and height (0) | 2020.07.08 | 
| moment.js (날짜관련 작업을 위한 자바스크립트 라이브러리) (0) | 2020.02.11 |