main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
428 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = hexadecimal
|
---|
4 |
|
---|
5 | // Check if the given character code, or the character code at the first
|
---|
6 | // character, is hexadecimal.
|
---|
7 | function hexadecimal(character) {
|
---|
8 | var code = typeof character === 'string' ? character.charCodeAt(0) : character
|
---|
9 |
|
---|
10 | return (
|
---|
11 | (code >= 97 /* a */ && code <= 102) /* z */ ||
|
---|
12 | (code >= 65 /* A */ && code <= 70) /* Z */ ||
|
---|
13 | (code >= 48 /* A */ && code <= 57) /* Z */
|
---|
14 | )
|
---|
15 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.