Created
August 11, 2016 22:26
-
-
Save ihgrant/c522b5b2619b0ae656eb49302e18979e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function tryparseJson(jsonstring) { | |
try { | |
return JSON.parse(jsonstring); | |
} catch (e) { | |
return false; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {tryParseJson} from './helpers' | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment