UNPKG

@lenne.tech/cli

Version:

lenne.Tech CLI: lt

20 lines (19 loc) 411 B
"use strict"; /** * JSON utility functions */ Object.defineProperty(exports, "__esModule", { value: true }); exports.safeJsonParse = safeJsonParse; /** * Safely parse JSON without throwing * @param text - JSON string to parse * @returns Parsed object or null if parsing fails */ function safeJsonParse(text) { try { return JSON.parse(text); } catch (_a) { return null; } }