Module: helpers

The helpers module.

Source:

Methods

(static) coreDataDateToJSDate(coreDataDate) → {Date}

Convert a Apple Core Data timestamp to a JavaScript Date object.

Apple's Core Data assumes Epoch to be thirtyone years before the normal UNIX Epoch. This function simply adds 978307200000 (thirtyone years) to the date to convert it.

Parameters:
Name Type Description
coreDataDate Number

The Core Data timestamp.

Source:
Returns:

The date object.

Type
Date

(static) progress() → {cliProgress~Bar|Object}

Get the progress object for the program.

If the progress flag is disabled, it returns a mock object that doesn't actually do anything.

Source:
Returns:

The progress bar object.

Type
cliProgress~Bar | Object

(static) setShowProgress(showProgress)

Set wether to show or not to show the progress bar.

This either sets the progress bar object to either the real one from cli-progress or a mocked noop version.

Parameters:
Name Type Description
showProgress Bool

Wether to show a progress bar or not.

Source: