diff options
Diffstat (limited to 'tools/eslint/node_modules/is-alphanumerical/index.js')
-rw-r--r-- | tools/eslint/node_modules/is-alphanumerical/index.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/is-alphanumerical/index.js b/tools/eslint/node_modules/is-alphanumerical/index.js new file mode 100644 index 00000000000..58ea455baa4 --- /dev/null +++ b/tools/eslint/node_modules/is-alphanumerical/index.js @@ -0,0 +1,29 @@ +/** + * @author Titus Wormer + * @copyright 2016 Titus Wormer + * @license MIT + * @module is-alphanumerical + * @fileoverview Check if a character is alphanumerical. + */ + +'use strict'; + +/* eslint-env commonjs */ + +/* Dependencies. */ +var alphabetical = require('is-alphabetical'); +var decimal = require('is-decimal'); + +/* Expose. */ +module.exports = alphanumerical; + +/** + * Check whether the given character code, or the character + * code at the first character, is alphanumerical. + * + * @param {string|number} character + * @return {boolean} - Whether `character` is alphanumerical. + */ +function alphanumerical(character) { + return alphabetical(character) || decimal(character); +} |