Skip to main content
Module

x/fetchbase64/src/auto.ts

A simple module to fetch Base64 data of any image/gif, remote or local.
Latest
File
import { fetchLocal, fetchRemote } from "../mod.ts"
export const fetchAuto = (path: string, onlyData?: boolean) => { try { new URL(path) return fetchRemote(path, onlyData) } catch(e) { return fetchLocal(path, onlyData) }}