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.

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

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 2 years ago

Package Health Score

59 / 100
Full package analysis