<commit_before>'use strict';

module.exports = class PivotBuffer {
    constructor(size) {
        this.size = size;
        this.$buffer = new Buffer(size);
        
        this.$buffer.fill(0);

        this.$curSize = 0;
    }
    
    append(buffer) {
        if (buffer.length == 0) {
            return;
        }

        if (buffer.length >= this.size) {
            // buffer being appended is longer than buffer size
            buffer.copy(this.$buffer, 0, buffer.length - this.size);
        } else {
            // rotate current buffer
            var leftover = this.size - buffer.length;
            this.$buffer.copy(this.$buffer, 0, this.size - leftover);
<commit_msg>Use === instead of ==<commit_after>'use strict';

module.exports = class PivotBuffer {
    constructor(size) {
        this.size = size;
        this.$buffer = new Buffer(size);
        
        this.$buffer.fill(0);

        this.$curSize = 0;
    }
    
    append(buffer) {
        if (buffer.length === 0) {
            return;
        }

        if (buffer.length >= this.size) {
            // buffer being appended is longer than buffer size
            buffer.copy(this.$buffer, 0, buffer.length - this.size);
        } else {
            // rotate current buffer
            var leftover = this.size - buffer.length;
            this.$buffer.copy(this.$buffer, 0, this.size - leftover);

{'fraction_non_alphanumeric': 0.12581344902386118, 'fraction_numerical': 0.0072306579898770785, 'mean_word_length': 1.6564299424184261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1098900', 'n_tokens_mistral': 409, 'n_tokens_neox': 384, 'n_words': 95}