Skip to main content
Deno 2 is finally here 🎉️
Learn more

Dewnload

Yet another DenoJS library for downloading files from URL.

Usage

import { download } from "https://deno.land/x/dewnload/mod.ts";

download("https://picsum.photos/500/300", { fileName: "image.png" })
  .then((data) => console.log(data))
  .catch((err) => console.error(err));

API

Functions

download(string | URL, { options?: DownloadOptions }): Promise<Output>;

Interfaces

interface DownloadOptions {
  fileName?: string; // default: URL last path or `file`
  folder?: string[]; // default: none
}

interface Output {
  filename: string;
  path: string;
  size: number;
  url: string;
}

TODO

  • Folder support
  • Multiple input support