How to use the golden-layout.minifyConfig function in golden-layout

To help you get started, we’ve selected a few golden-layout examples, based on popular ways it is used in public projects.

github mattgodbolt / compiler-explorer / static / url.js View on Github external
function serialiseState(stateText) {
    var ctx = GoldenLayout.minifyConfig({content: stateText.content});
    ctx.version = 4;
    var uncompressed = risonify(ctx);
    var compressed = risonify({z: lzstring.compressToBase64(uncompressed)});
    var MinimalSavings = 0.20;  // at least this ratio smaller
    if (compressed.length < uncompressed.length * (1.0 - MinimalSavings)) {
        return compressed;
    } else {
        return uncompressed;
    }
}

golden-layout

A multi-screen javascript Layout manager

MIT
Latest version published 5 days ago

Package Health Score

82 / 100
Full package analysis