X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=src%2Ftemplate%2Ftemplate-helper.js;fp=src%2Ftemplate%2Ftemplate-helper.js;h=4c0ad9d3ec04b940765d0620ee84ed44ef30bf89;hb=f0bf29c75b0fd405ff92fa76f058e61162b87e43;hp=f15d3e69a99e22dbdb0b9e4412ba82af79aa4f65;hpb=4b7809255e4d2f07171963aacbe7488e93931da1;p=squeep-indie-auther diff --git a/src/template/template-helper.js b/src/template/template-helper.js index f15d3e6..4c0ad9d 100644 --- a/src/template/template-helper.js +++ b/src/template/template-helper.js @@ -5,8 +5,8 @@ const { TemplateHelper } = require('@squeep/html-template-helper'); /** * Escape a string to be suitable as a CSS name. - * @param {String} unsafeName - * @returns {String} + * @param {string} unsafeName unsafe name + * @returns {string} escaped name */ function escapeCSS(unsafeName) { return unsafeName.replace(/([^0-9a-zA-Z-])/g, '\\$1'); @@ -18,9 +18,9 @@ function escapeCSS(unsafeName) { * return the comparison between the two, for sorting. * Scopes are sorted such that they are grouped by application, then name. * Empty applications are sorted ahead of extant applications. - * @param {Array} a - * @param {Array} b - * @returns {Number} + * @param {[string, object]} a [scopeName, scopeDetails] + * @param {[string, object]} b [scopeName, scopeDetails] + * @returns {number} comparison */ function scopeCompare([aScope, aDetails], [bScope, bDetails]) { const { application: aApp } = aDetails; @@ -49,9 +49,9 @@ function scopeCompare([aScope, aDetails], [bScope, bDetails]) { /** * Populate common navLinks for page templates. - * @param {Number} pagePathLevel - * @param {Object} ctx - * @param {Object} options + * @param {number} pagePathLevel depth from root + * @param {object} ctx context + * @param {object} options options */ function navLinks(pagePathLevel, ctx, options) { if (!options.navLinks) {