@minofrk/xelto-diagram-canvas
Version:
An implementation of <xelto-diagram> in TypeScript.
17 lines • 450 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const msf_io_ts_1 = require("@minofrk/msf-io-ts");
function tryToParse(maybeJson) {
if (!maybeJson)
return;
try {
const maybeState = JSON.parse(maybeJson);
if (msf_io_ts_1.State.is(maybeState))
return maybeState;
}
catch (e) {
return;
}
}
exports.default = tryToParse;
//# sourceMappingURL=try-to-parse.js.map