npm.io
0.0.1-dev • Published 7 years ago

idaman-engine

Licence
MIT
Version
0.0.1-dev
Deps
8
Size
87 kB
Vulns
1
Weekly
0

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.

Keywords