@web-std/file
Version:
Web API compatible File implementation for node
14 lines (9 loc) • 414 B
JavaScript
import { Blob } from "./package.js"
import { File as WebFile } from "./file.js"
// Electron-renderer should get the browser implementation instead of node
// Browser configuration is not enough
// Marking export as a DOM File object instead of custom class.
/** @type {typeof globalThis.File} */
const File = typeof globalThis.File === "function" ? globalThis.File : WebFile
export { File, Blob }