basant307/AI_Governance_Project
048
1/**2 * Check if the given character code, or the character code at the first3 * character, is alphabetical.4 *5 * @param {string|number} character6 * @returns {boolean} Whether `character` is alphabetical.7 */8export function isAlphabetical(character) {9 const code =10 typeof character === 'string' ? character.charCodeAt(0) : character11 12 return (13 (code >= 97 && code <= 122) /* a-z */ ||14 (code >= 65 && code <= 90) /* A-Z */15 )16}17 