From a90c7163569e1cd4483908238643d47661092bcc Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Tue, 18 Aug 2020 22:17:31 -0400 Subject: [PATCH] Removed functions --- js/utils.js | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/js/utils.js b/js/utils.js index e4572149028..2026efe2e9c 100644 --- a/js/utils.js +++ b/js/utils.js @@ -411,31 +411,3 @@ function median(arr = []) { (nums[mid] + nums[mid - 1]) / 2 : nums[mid]; } - -/** - * Returns whether a letter is a vowel. - * @param {string} char Can use any case - * @returns {boolean} - */ -function isVowel(char) { - return /[aeiou]/.test(char); -} - -/** - * Returns whether a string begins with a vowel. - * @param {string} word Can use any case - * @returns {boolean} - */ -function startsWithVowel(word) { - return isVowel(word.charAt(0).toLowerCase()); -} - -/** - * @example const a = aOrAn("apple"); - * - * `She is eating ${a} apple.` // "She is eating an apple." - * @param {string} word - */ -function aOrAn(word) { - return startsWithVowel(word) ? 'an' : 'a'; -} -- GitLab