0.0.1-dev • Published 5 years ago

idaman-engine v0.0.1-dev

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

idaman-engine

Idaman Engine

API

new Download(url: string, options?: DownloadOptions): Download

Creates a new download.

DownloadOptions

  • outDir?: string Default: current working directory.
  • outFile?: string Default: parsed from URL.
  • maxConnection?: number Default: 4.
  • overwrite?: boolean Default: true.
  • sessionPath?: string Default: outDir/outFile.idmn
  • useServerFileName?: boolean Default: true.

start(): void

Starts download.

abort(): void

Aborts download.

on(event: string, listener: function)

Registers a listener to an event.

on('error', (Error) => {})

Emitted if error occured.

on('change', (DownloadChange) => {})

Emitted if there are changes in download options.

on('finish', () => {})

Emitted if download has been finished.