UNPKG

beautiful-react-hooks

Version:

A collection of beautiful (and hopefully useful) React hooks to speed-up your components and hooks development

16 lines (15 loc) 337 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Safely parse JSON string to object or null * @param parseString */ var safelyParseJson = function (parseString) { try { return JSON.parse(parseString); } catch (e) { return null; } }; exports.default = safelyParseJson;