CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
index.js17 linesDownload Raw Back to is-alphabetical
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 
basant307/AI_Governance_Project · CoolFace