<commit_before>// Type definitions for koa-send v3.3
// Project: https://github.com/koajs/send
// Definitions by: <NAME> <https://github.com/pe8ter>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import * as Koa from 'koa';

interface ISendOptions {
    root?: string;
    index?: string;
    maxAge?: number;
    hidden?: boolean;
    format?: boolean;
    gzip?: boolean;
    setHeaders?: Function;
    extensions?: string[];
}

declare function send(ctx: Koa.Context, path: string, opts?: ISendOptions): Promise<string>;

declare namespace send {}

export = send;<commit_msg>koa-send v4,1<commit_after>// Type definitions for koa-send 4.1
// Project: https://github.com/koajs/send
// Definitions by: <NAME> <https://github.com/pe8ter>
//                 <NAME> <https://github.com/tlaziuk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import {
    Context,
} from "koa";

import {
    Stats,
} from "fs";


declare function send(ctx: Context, path: string, opts?: send.IOpts): Promise<string>;

declare namespace send {
    interface IOpts {
        /** Browser cache max-age in milliseconds. (defaults to 0) */
        maxage?: number;
        maxAge?: IOpts["maxage"];
        /** Tell the browser the resource is immutable and can be cached indefinitely. (defaults to false) */
        immutable?: boolean;
        /** Allow transfer of hidden files. (defaults to false) */
        hidden?: boolean;
        /** Root directory to restrict file access. (defaults to '') */
        root?: string;
        /** Name of the index file to serve automatically when visiting the root location. (defaults to none) */
        index?: string;
        /** Try to serve the gzipped version of a file automatically when gzip is supported by a client and if the requested file with .gz extension exists. (defaults to true). */
        gzip?: boolean;
        /** Try to serve the brotli version of a file automatically when brotli is supported by a client and if the requested file with .br extension exists. (defaults to true). */
        brotli?: boolean;
        /** If not false (defaults to true), format the path to serve static file servers and not require a trailing slash for directories, so that you can do both /directory and /directory/. */
        format?: boolean;
        /** Function to set custom headers on response. */
        setHeaders?: (res: Context["res"], path: string, stats: Stats) => any;
        /** Try to match extensions from passed array to search for file when no extension is sufficed in URL. First found is served. (defaults to false) */
        extensions?: string[] | false;
    }
}

export = send;
{'fraction_non_alphanumeric': 0.11706422018348624, 'fraction_numerical': 0.0047706422018348625, 'mean_word_length': 2.9336219336219336, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, 'https://': 7, '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': '1277660', 'n_tokens_mistral': 752, 'n_tokens_neox': 740, 'n_words': 302}