Add JSDoc documentation and file headers to all source files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 18:57:58 +08:00
co-authored by Claude Opus 4.6
parent 3b7b6ae859
commit 7fec6cb63f
199 changed files with 2764 additions and 503 deletions
+14 -3
View File
@@ -1,7 +1,18 @@
// The Lucia project.
// Copyright 2023-2026 DSP, inc. All rights reserved.
// Authors:
// chiayin.kuo@dsp.im (chiayin), 2023/1/31
// imacat.yang@dsp.im (imacat), 2023/9/23
// cindy.chang@dsp.im (Cindy Chang), 2024/5/30
/** @module abbreviateNumber Duration abbreviation formatting. */
/**
* 將數字轉換成簡寫的形式,設定 dhms 的數值
* @param {number} totalSeconds 總秒數
* @returns {string}
* Converts a total number of seconds into a human-readable abbreviated
* duration string using days, hours, minutes, and seconds.
*
* @param {number} totalSeconds - The total number of seconds to convert.
* @returns {string} The abbreviated duration string (e.g. "2d 3h 15m 30s"),
* or "0" if totalSeconds is zero.
*/
export default function abbreviateNumber(totalSeconds) {
let seconds = 0;