mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
* install eslint-plugin-markdown * add doc/.eslintrc.yaml * add `<!-- eslint-disable rule -->` or `<!-- eslint-disable -->` for the rest of problematic code * .js files in doc folder added to .eslintignore * update Makefile and vcbuild.bat PR-URL: https://github.com/nodejs/node/pull/12563 Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
30 lines
677 B
JavaScript
30 lines
677 B
JavaScript
/**
|
|
* @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);
|
|
}
|