<commit_before>// Type definitions for text-encoding
// Project: https://github.com/inexorabletash/text-encoding
// Definitions by: <NAME> <https://github.com/pine613/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace TextEncoding {
    interface TextDecoderOptions {
        fatal?: boolean;
        ignoreBOM?: boolean;
    }

    interface TextDecodeOptions {
        stream?: boolean;
    }

    interface TextEncoderOptions {
        NONSTANDARD_allowLegacyEncoding?: boolean;
    }

    interface TextDecoder {
        encoding: string;
        fatal: boolean;
        ignoreBOM: boolean;
        decode(input?: ArrayBufferView, options?: TextDecodeOptions): string;
    }

    interface TextEncoder {
        encoding: string;
        encode(input?: string, options?: TextEncodeOptions): Uint8Array;
    }

    interface TextEncodeOptions {
        stream?: boolean;
    }
}

declare var TextDecoder: {
    (label?: string, options?: TextEncoding.TextDecoderOptions): TextEncoding.TextDecoder;
    new (label?: string, options?: TextEncoding.TextDecoderOptions): TextEncoding.TextDecoder;
};

declare var TextEncoder: {
    (utfLabel?: string, options?: TextEncoding.TextEncoderOptions): TextEncoding.TextEncoder;
    new (utfLabel?: string, options?: TextEncoding.TextEncoderOptions): TextEncoding.TextEncoder;
};<commit_msg>support AMD require / ES6 import<commit_after>// Type definitions for text-encoding
// Project: https://github.com/inexorabletash/text-encoding
// Definitions by: <NAME> <https://github.com/pine613/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace TextEncoding {
    interface TextDecoderOptions {
        fatal?: boolean;
        ignoreBOM?: boolean;
    }

    interface TextDecodeOptions {
        stream?: boolean;
    }

    interface TextEncoderOptions {
        NONSTANDARD_allowLegacyEncoding?: boolean;
    }

    interface TextDecoder {
        encoding: string;
        fatal: boolean;
        ignoreBOM: boolean;
        decode(input?: ArrayBufferView, options?: TextDecodeOptions): string;
    }

    interface TextEncoder {
        encoding: string;
        encode(input?: string, options?: TextEncodeOptions): Uint8Array;
    }

    interface TextEncodeOptions {
        stream?: boolean;
    }

    interface TextEncoderStatic {
        (utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
        new (utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
    }

    interface TextDecoderStatic {
        (label?: string, options?: TextDecoderOptions): TextDecoder;
        new (label?: string, options?: TextDecoderOptions): TextDecoder;
    }

    interface TextEncodingStatic {
        TextEncoder: TextEncoderStatic;
        TextDecoder: TextDecoderStatic;
    }
}

declare var TextDecoder: TextEncoding.TextDecoderStatic;

declare var TextEncoder: TextEncoding.TextEncoderStatic;

declare var TextEncoding: TextEncoding.TextEncodingStatic;

declare module "text-encoding" {
    export = TextEncoding;
}
{'fraction_non_alphanumeric': 0.09862385321100918, 'fraction_numerical': 0.002948885976408912, 'mean_word_length': 3.4375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '950993', 'n_tokens_mistral': 807, 'n_tokens_neox': 779, 'n_words': 193}