Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

26
node_modules/es-toolkit/dist/predicate/isFile.mjs generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import { isBlob } from "./isBlob.mjs";
//#region src/predicate/isFile.ts
/**
* Checks if the given value is a File.
*
* This function tests whether the provided value is an instance of `File`.
* It returns `true` if the value is an instance of `File`, and `false` otherwise.
*
* @param {unknown} x - The value to test if it is a File.
* @returns {x is File} True if the value is a File, false otherwise.
*
* @example
* const value1 = new File(["content"], "example.txt");
* const value2 = {};
* const value3 = new Blob(["content"], { type: "text/plain" });
*
* console.log(isFile(value1)); // true
* console.log(isFile(value2)); // false
* console.log(isFile(value3)); // false
*/
function isFile(x) {
if (typeof File === "undefined") return false;
return isBlob(x) && x instanceof File;
}
//#endregion
export { isFile };