Skip to content

Commit

Permalink
refactor: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkeyl committed Sep 1, 2024
1 parent 31cceb8 commit 0a7135e
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@ import { error } from '@archoleat/notifier';
import type { Parameters } from './parameters.ts';

/**
* The asynchronous function `validateFontFileName` validates
* if a given font file name matches a specific regex.
* Validates the font file name.
*
* @param {string} file - The `file` parameter in the `validateFontFileName`
* function is a string that represents the file name of a font file that
* you want to validate.
* @param {string} file - The file path of the font file.
*
* @param {string | RegExp} regex - The `regex` parameter in the
* `validateFontFileName` function is used to provide a custom regular
* expression for validating the font file name. If a custom
* regex is not provided, the function uses a default regex
* to validate the font file name.
* @param {string} [regex=''] - The regular expression pattern to
* match the font file name.
*
* @returns The function `validateFontFileName` is returning a boolean value.
* It returns `true` if the file name matches the specified regex,
* and `false` if it does not match.
* @return {boolean} - Return true if the font file name matches the
* specified regex pattern, false otherwise.
*/
const validateFontFileName = async (parameters: Parameters) => {
const { file, regex = '' } = parameters;
Expand Down

0 comments on commit 0a7135e

Please sign in to comment.