UNPKG

nodejs-order-book

Version:

Node.js Lmit Order Book for high-frequency trading (HFT).

25 lines (24 loc) 682 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.safeParse = exports.safeStringify = void 0; /* node:coverage ignore next - Don't know why this line is uncovered */ // biome-ignore lint/suspicious/noExplicitAny: <explanation> var safeStringify = function (value) { try { return JSON.stringify(value); } catch (error) { return null; } }; exports.safeStringify = safeStringify; /* node:coverage ignore next - Don't know why this line is uncovered */ var safeParse = function (value) { try { return JSON.parse(value); } catch (error) { return null; } }; exports.safeParse = safeParse;