From: Chris Duncan Date: Sun, 26 Jul 2026 07:24:29 +0000 (-0700) Subject: Document function parameters. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=05e6ef7bcf68931cb6b90ffdad95a42a7ff91ee0;p=nano-pow.git Document function parameters. --- diff --git a/index.html b/index.html index eaa354a..26f9828 100644 --- a/index.html +++ b/index.html @@ -46,6 +46,11 @@ SPDX-License-Identifier: GPL-3.0-or-later return [...bytes].map(b => b.toString(16).padStart(2, '0')).join('') } + /** + * @param {number[]} times + * @param {string} type + * @param {number} effort + */ function average (times, type, effort) { const averages = stats(times) const title = type === 'WebGPU' @@ -245,6 +250,9 @@ SPDX-License-Identifier: GPL-3.0-or-later logger.log('%TESTING COMPLETE', 'color:orange;font-weight:bold') } + /** + * @param {InputEvent} event + */ function startValidation (event) { const difficulty = document.getElementById('difficulty')?.value const work = document.getElementById('work')?.value @@ -277,6 +285,9 @@ SPDX-License-Identifier: GPL-3.0-or-later document.getElementById('hash').addEventListener('input', startValidation) document.getElementById('api').addEventListener('input', startValidation) + /** + * @param {InputEvent} event + */ function startTest (event) { event.target.disabled = true const api = document.getElementById('api')