UNPKG

@prass/botpress-native

Version:

A simple and powerful SDK for integrating Botpress Chat API with React Native,

18 lines (16 loc) 349 B
/** * Check if a string is a valid JSON object * @param str - The string to check * @returns True if the string is a valid JSON object, false otherwise */ const isJson = (str) => { try { JSON.parse(str); return true; } catch (e) { return false; } }; export { isJson }; //# sourceMappingURL=isJson.js.map