Download node_modules/form-data-encoder/lib/esm/util/isFileLike.js from HarshvardhanCn01/Voice-Assistant: direct link, hf CLI and curl.
- Browser
- Download file 327 Bytes
-
https://huggingface.co/spaces/HarshvardhanCn01/Voice-Assistant/resolve/main/node_modules/form-data-encoder/lib/esm/util/isFileLike.js
- Command line
-
hf download hf://spaces/HarshvardhanCn01/Voice-Assistant/node_modules/form-data-encoder/lib/esm/util/isFileLike.js
-
curl -L -o isFileLike.js https://huggingface.co/spaces/HarshvardhanCn01/Voice-Assistant/resolve/main/node_modules/form-data-encoder/lib/esm/util/isFileLike.js
327 Bytes
| import isFunction from "./isFunction.js"; | |
| export const isFileLike = (value) => Boolean(value | |
| && typeof value === "object" | |
| && isFunction(value.constructor) | |
| && value[Symbol.toStringTag] === "File" | |
| && isFunction(value.stream) | |
| && value.name != null | |
| && value.size != null | |
| && value.lastModified != null); | |