Reference Source

Function

Static Public Summary
public

DOWNLOAD_TORRENT_TEMPLATE(torrent: Torrent)

Download Torrent Template This renders a HTML view for a given torrent

public

TORRENT_TEMPLATE(torrent: Torrent)

Seed Torrent Template This renders a HTML view for a given torrent

public

Transform any amount of bytes to a human readable format

public

template(strings: *, keys: *): Function

Wrap a string literal

Static Public

public DOWNLOAD_TORRENT_TEMPLATE(torrent: Torrent) source

import {DOWNLOAD_TORRENT_TEMPLATE} from './assets/templates/torrent_down.js'

Download Torrent Template This renders a HTML view for a given torrent

Params:

NameTypeAttributeDescription
torrent Torrent

The torrent you want to generate a template for

public TORRENT_TEMPLATE(torrent: Torrent) source

import {TORRENT_TEMPLATE} from './assets/templates/torrent_seed.js'

Seed Torrent Template This renders a HTML view for a given torrent

Params:

NameTypeAttributeDescription
torrent Torrent

The torrent you want to generate a template for

public humanFileSize(bytes: number, si: boolean): string source

import {humanFileSize} from './assets/humanFileSize.js'

Transform any amount of bytes to a human readable format

Params:

NameTypeAttributeDescription
bytes number

The amount of bytes

si boolean

Use 1000 as base.

Return:

string

The human readable string

public template(strings: *, keys: *): Function source

import {template} from './assets/templates/template.js'

Wrap a string literal

Params:

NameTypeAttributeDescription
strings *
keys *

Return:

Function