Files
NapCatQQ/.pnpm-store/v3/files/11/ffd6cc374d95151114429e9f3672e7cdbff0fd9e77d27670eed2e315d87e4669e0c886ac49aadbdd887730169c8d1b7b0dce51e8ac4648960a7f9ebd0df9e4
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

14 lines
374 B
Plaintext

/**
* Check if the given character code, or the character code at the first
* character, is decimal.
*
* @param {string|number} character
* @returns {boolean} Whether `character` is a decimal
*/
export function isDecimal(character) {
const code =
typeof character === 'string' ? character.charCodeAt(0) : character
return code >= 48 && code <= 57 /* 0-9 */
}