mirror of https://github.com/lukechilds/docs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
524 B
23 lines
524 B
6 years ago
|
var identifierStartTable = [];
|
||
|
|
||
|
for (var i = 0; i < 128; i++) {
|
||
|
identifierStartTable[i] =
|
||
|
i === 36 || // $
|
||
|
i >= 65 && i <= 90 || // A-Z
|
||
|
i === 95 || // _
|
||
|
i >= 97 && i <= 122; // a-z
|
||
|
}
|
||
|
|
||
|
var identifierPartTable = [];
|
||
|
|
||
|
for (var i = 0; i < 128; i++) {
|
||
|
identifierPartTable[i] =
|
||
|
identifierStartTable[i] || // $, _, A-Z, a-z
|
||
|
i >= 48 && i <= 57; // 0-9
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
asciiIdentifierStartTable: identifierStartTable,
|
||
|
asciiIdentifierPartTable: identifierPartTable
|
||
|
};
|