CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
isFile.d.ts22 linesDownload Raw Back to predicate
1/**2 * Checks if the given value is a File.3 *4 * This function tests whether the provided value is an instance of `File`.5 * It returns `true` if the value is an instance of `File`, and `false` otherwise.6 *7 * @param {unknown} x - The value to test if it is a File.8 * @returns {x is File} True if the value is a File, false otherwise.9 *10 * @example11 * const value1 = new File(["content"], "example.txt");12 * const value2 = {};13 * const value3 = new Blob(["content"], { type: "text/plain" });14 *15 * console.log(isFile(value1)); // true16 * console.log(isFile(value2)); // false17 * console.log(isFile(value3)); // false18 */19declare function isFile(x: unknown): x is File;20 21export { isFile };22 
basant307/AI_Governance_Project · CoolFace