mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Update jsdoc
This commit is contained in:
parent
bdfd6e5e9f
commit
4b1c7da171
@ -122,6 +122,13 @@ NodeHelper.checkFetchStatus = function (response) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Look at the specified error and return an appropriate error type, that
|
||||||
|
* can be translated to a detailed error message
|
||||||
|
*
|
||||||
|
* @param {Error} error the error from fetching something
|
||||||
|
* @returns {string} the string of the detailed error message in the translations
|
||||||
|
*/
|
||||||
NodeHelper.checkFetchError = function (error) {
|
NodeHelper.checkFetchError = function (error) {
|
||||||
let error_type = "MODULE_ERROR_UNSPECIFIED";
|
let error_type = "MODULE_ERROR_UNSPECIFIED";
|
||||||
if (error.code === "EAI_AGAIN") {
|
if (error.code === "EAI_AGAIN") {
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
/**
|
/**
|
||||||
* Dismiss the notification
|
* Dismiss the notification
|
||||||
*
|
*
|
||||||
* @param close
|
* @param {boolean} [close] call the onClose callback at the end
|
||||||
*/
|
*/
|
||||||
NotificationFx.prototype.dismiss = function (close = true) {
|
NotificationFx.prototype.dismiss = function (close = true) {
|
||||||
this.active = false;
|
this.active = false;
|
||||||
|
@ -18,8 +18,8 @@ const CalendarUtils = {
|
|||||||
* Calculate the time correction, either dst/std or full day in cases where
|
* Calculate the time correction, either dst/std or full day in cases where
|
||||||
* utc time is day before plus offset
|
* utc time is day before plus offset
|
||||||
*
|
*
|
||||||
* @param {object} event
|
* @param {object} event the event which needs adjustement
|
||||||
* @param {Date} date
|
* @param {Date} date the date on which this event happens
|
||||||
* @returns {number} the necessary adjustment in hours
|
* @returns {number} the necessary adjustment in hours
|
||||||
*/
|
*/
|
||||||
calculateTimezoneAdjustment: function (event, date) {
|
calculateTimezoneAdjustment: function (event, date) {
|
||||||
@ -117,6 +117,13 @@ const CalendarUtils = {
|
|||||||
return adjustHours;
|
return adjustHours;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the events from ical according to the given config
|
||||||
|
*
|
||||||
|
* @param {object} data the calendar data from ical
|
||||||
|
* @param {object} config The configuration object
|
||||||
|
* @returns {string[]} the filtered events
|
||||||
|
*/
|
||||||
filterEvents: function (data, config) {
|
filterEvents: function (data, config) {
|
||||||
const newEvents = [];
|
const newEvents = [];
|
||||||
|
|
||||||
@ -500,8 +507,8 @@ const CalendarUtils = {
|
|||||||
/**
|
/**
|
||||||
* Lookup iana tz from windows
|
* Lookup iana tz from windows
|
||||||
*
|
*
|
||||||
* @param msTZName
|
* @param {string} msTZName the timezone name to lookup
|
||||||
* @returns {*|null}
|
* @returns {string|null} the iana name or null of none is found
|
||||||
*/
|
*/
|
||||||
getIanaTZFromMS: function (msTZName) {
|
getIanaTZFromMS: function (msTZName) {
|
||||||
// Get hash entry
|
// Get hash entry
|
||||||
@ -571,12 +578,13 @@ const CalendarUtils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Determines if the user defined title filter should apply
|
||||||
*
|
*
|
||||||
* @param title
|
* @param {string} title the title of the event
|
||||||
* @param filter
|
* @param {string} filter the string to look for, can be a regex also
|
||||||
* @param useRegex
|
* @param {boolean} useRegex true if a regex should be used, otherwise it just looks for the filter as a string
|
||||||
* @param regexFlags
|
* @param {string} regexFlags flags that should be applied to the regex
|
||||||
* @returns {boolean|*}
|
* @returns {boolean} True if the title should be filtered out, false otherwise
|
||||||
*/
|
*/
|
||||||
titleFilterApplies: function (title, filter, useRegex, regexFlags) {
|
titleFilterApplies: function (title, filter, useRegex, regexFlags) {
|
||||||
if (useRegex) {
|
if (useRegex) {
|
||||||
|
@ -55,7 +55,7 @@ Module.register("compliments", {
|
|||||||
/**
|
/**
|
||||||
* Generate a random index for a list of compliments.
|
* Generate a random index for a list of compliments.
|
||||||
*
|
*
|
||||||
* @param {string[]} compliments Array with compliments.
|
* @param {string[]} compliments Array with compliments.
|
||||||
* @returns {number} a random index of given array
|
* @returns {number} a random index of given array
|
||||||
*/
|
*/
|
||||||
randomIndex: function (compliments) {
|
randomIndex: function (compliments) {
|
||||||
|
@ -27,8 +27,8 @@ module.exports = NodeHelper.create({
|
|||||||
* Creates a fetcher for a new feed if it doesn't exist yet.
|
* Creates a fetcher for a new feed if it doesn't exist yet.
|
||||||
* Otherwise it reuses the existing one.
|
* Otherwise it reuses the existing one.
|
||||||
*
|
*
|
||||||
* @param {object} feed The feed object.
|
* @param {object} feed The feed object
|
||||||
* @param {object} config The configuration object.
|
* @param {object} config The configuration object
|
||||||
*/
|
*/
|
||||||
createFetcher: function (feed, config) {
|
createFetcher: function (feed, config) {
|
||||||
const url = feed.url || "";
|
const url = feed.url || "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user