UNPKG

@tidecloak/js

Version:

TideCloak client side JS SDK

28 lines 691 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class RuleSettings { /** * @param {string} data - JSON string */ constructor(data) { this.rawString = data; try { this.object = JSON.parse(this.rawString); } catch (e) { console.error("Invalid JSON format", e); this.object = null; } } /** * Returns a formatted JSON object for easy reading. */ toPrettyObject() { if (this.object) { return this.object; } return "Invalid JSON data"; } } exports.default = RuleSettings; //# sourceMappingURL=RuleSettings.js.map