UNPKG

@xan105/request

Version:

Simple HTTP request client with file download progress

19 lines (13 loc) 296 B
import { shouldStringNotEmpty } from "@xan105/is/assert"; async function load(name){ shouldStringNotEmpty(name); let module; try { module = (await import(name)).default; if (!module) module = null; } catch { module = null; } return module; } export { load };