/** * The utilities in this file are based on the NPM module `istextorbinary`. * * The implementation is copied here to reduce dependency overhead * and improve compatibility with NodeJS compilers like `@vercel/ncc`. * * @see the `LICENSE` file at the root of this source tree: * https://github.com/bevry/istextorbinary/blob/master/source/index.ts */ /// /** * Determine if the filename and/or buffer is binary. * * Determined by extension checks first (if filename is available), otherwise if * the extension is unrecognized or no filename is provided, will perform a * slower buffer encoding detection. * * Extension checks are quicker. * Encoding checks cannot guarantee accuracy for chars between utf8 and utf16. * * The extension checks are performed using the following resources: * - https://github.com/bevry/textextensions * - https://github.com/bevry/binaryextensions * * @param filename The filename for the file/buffer if available * @param buffer The buffer for the file if available * @returns Will be `null` if neither `filename` nor `buffer` were provided. Otherwise will be a `boolean` value with the detection result. */ export declare function isBinary(filename?: string | null, buffer?: Buffer | null): boolean | null;