UNPKG

flipper-plugin

Version:

Flipper Desktop plugin SDK and components

21 lines 622 B
"use strict"; /** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ Object.defineProperty(exports, "__esModule", { value: true }); exports.safeStringify = void 0; function safeStringify(value, space = 2) { try { return JSON.stringify(value, (_, v) => (typeof v === 'bigint' ? v.toString() : v), space); } catch (e) { return `<Failed to serialize: ${e}>`; } } exports.safeStringify = safeStringify; //# sourceMappingURL=safeStringify.js.map