How to use the @hpcc-js/other.Persist.serialize function in @hpcc-js/other

To help you get started, we’ve selected a few @hpcc-js/other examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / marshaller / src / ddl1 / HipieDDLMixin.ts View on Github external
generateTestPage() {
        if (this._marshaller) {
            const context = this;
            const state = Persist.serialize(context, function (widget, publishItem) {
                if (publishItem.id === "databomb" || publishItem.id === "ddlUrl") {
                    return true;
                }
                return false;
            });
            const databomb = this._marshaller.createDatabomb();
            const page = tpl
                .replace("{VERSION}", Platform.version())
                .replace("{STATE}", state)
                .replace("{DDL}", context._marshaller._json.replace("WUID", "databomb"))
                .replace("{DATABOMB}", JSON.stringify(databomb))
                ;
            Utility.downloadString("TEXT", page, "test");
        }
    }