File tree Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -42,33 +42,6 @@ export const isFile = (value: unknown): value is FileLike => Boolean(
42
42
)
43
43
44
44
/**
45
- * Check if given object is `File`.
46
- *
47
- * Note that this function will return `false` for Blob, because the FormDataEncoder expects FormData to return File when a value is binary data.
48
- *
49
- * @param value an object to test
50
- *
51
- * @api public
52
- *
53
45
* @deprecated use `isFile` instead
54
- *
55
- * This function will return `true` for FileAPI compatible `File` objects:
56
- *
57
- * ```
58
- * import {isFileLike} from "form-data-encoder"
59
- *
60
- * isFileLike(new File(["Content"], "file.txt")) // -> true
61
- * ```
62
- *
63
- * However, if you pass a Node.js `Buffer` or `ReadStream`, it will return `false`:
64
- *
65
- * ```js
66
- * import {createReadStream} from "node:fs"
67
- *
68
- * import {isFileLike} from "form-data-encoder"
69
- *
70
- * isFileLike(Buffer.from("Content")) // -> false
71
- * isFileLike(createReadStream("path/to/a/file.txt")) // -> false
72
- * ```
73
- */
46
+ */
74
47
export const isFileLike = isFile
You can’t perform that action at this time.
0 commit comments