main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
885 bytes
|
Rev | Line | |
---|
[d565449] | 1 | const unicode = require('../lib/unicode')
|
---|
| 2 |
|
---|
| 3 | module.exports = {
|
---|
| 4 | isSpaceSeparator (c) {
|
---|
| 5 | return typeof c === 'string' && unicode.Space_Separator.test(c)
|
---|
| 6 | },
|
---|
| 7 |
|
---|
| 8 | isIdStartChar (c) {
|
---|
| 9 | return typeof c === 'string' && (
|
---|
| 10 | (c >= 'a' && c <= 'z') ||
|
---|
| 11 | (c >= 'A' && c <= 'Z') ||
|
---|
| 12 | (c === '$') || (c === '_') ||
|
---|
| 13 | unicode.ID_Start.test(c)
|
---|
| 14 | )
|
---|
| 15 | },
|
---|
| 16 |
|
---|
| 17 | isIdContinueChar (c) {
|
---|
| 18 | return typeof c === 'string' && (
|
---|
| 19 | (c >= 'a' && c <= 'z') ||
|
---|
| 20 | (c >= 'A' && c <= 'Z') ||
|
---|
| 21 | (c >= '0' && c <= '9') ||
|
---|
| 22 | (c === '$') || (c === '_') ||
|
---|
| 23 | (c === '\u200C') || (c === '\u200D') ||
|
---|
| 24 | unicode.ID_Continue.test(c)
|
---|
| 25 | )
|
---|
| 26 | },
|
---|
| 27 |
|
---|
| 28 | isDigit (c) {
|
---|
| 29 | return typeof c === 'string' && /[0-9]/.test(c)
|
---|
| 30 | },
|
---|
| 31 |
|
---|
| 32 | isHexDigit (c) {
|
---|
| 33 | return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
|
---|
| 34 | },
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.