Captain is currently in ALPHA. We are happy to get your feedback
Core API
Helpers Utils Download Restart

Module: helpers/utils/download-restart

Table of contents

Functions

Functions

modifyState

modifyState(state): DownloadState

Modifies the state if it matches a specific condition.

Parameters

NameTypeDescription
stateDownloadStateThe current state as a string.

Returns

DownloadState

The modified state.

Defined in

src/electron/helpers/utils/download-restart.ts:10 (opens in a new tab)


traverseAndModify

traverseAndModify(tree): DownloadsSettings

Recursively traverses and modifies a tree structure.

Parameters

NameTypeDescription
treeDownloadsSettingsThe tree to traverse and modify.

Returns

DownloadsSettings

The modified tree.

Defined in

src/electron/helpers/utils/download-restart.ts:23 (opens in a new tab)