INNER CODE UNIT · JavaScript

input

bastillion-io/Bastillion · src/main/webapp/_res/js/terminal-output.js:13

            var input = pending + chunk;
            pending = '';
            markers.forEach(function (marker) { input = input.split(marker).join(''); });
            // Hold only an exact prefix of a known marker, never ordinary text.
            var keep = 0;
            markers.forEach(function (marker) {
                for (var size = 1; size < marker.length && size <= input.length; size++) {
                    if (input.endsWith(marker.slice(0, size))) keep = Math.max(keep, size);
                }
            });
            if (keep) { pending = input.slice(-keep); input = input.slice(0, -keep); }
            return input;
        };
    }
    if (typeof module !== 'undefined' && module.exports) module.exports = createOutputFilter;
    else root.createBastillionOutputFilter = createOutputFilter;
}(typeof window !== 'undefined' ? window : globalThis));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…