summaryrefslogtreecommitdiff
path: root/node_modules/is-alphanumerical/index.js
blob: 10188f360daaa7fd24c683cde421d51ab7c60be8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import {isAlphabetical} from 'is-alphabetical'
import {isDecimal} from 'is-decimal'

/**
 * Check if the given character code, or the character code at the first
 * character, is alphanumerical.
 *
 * @param {string|number} character
 * @returns {boolean} Whether `character` is alphanumerical.
 */
export function isAlphanumerical(character) {
  return isAlphabetical(character) || isDecimal(character)
}