This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const desiredOutput = [ | |
| { | |
| type: 'start_of_line', | |
| startingIndex: 0, | |
| lastIndex: 0, | |
| group: '^', | |
| children: [], | |
| }, | |
| { | |
| type: 'positive_lookbehind', |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const unicode=["\u0000","\u0001","\u0002","\u0003","\u0004","\u0005","\u0006","\u0007","\u0008","\u0009","\u000A","\u000B","\u000C","\u000D","\u000E","\u000F","\u0010","\u0011","\u0012","\u0013","\u0014","\u0015","\u0016","\u0017","\u0018","\u0019","\u001A","\u001B","\u001C","\u001D","\u001E","\u001F","\u0020","\u0021","\u0022","\u0023","\u0024","\u0025","\u0026","\u0027","\u0028","\u0029","\u002A","\u002B","\u002C","\u002D","\u002E","\u002F","\u0030","\u0031","\u0032","\u0033","\u0034","\u0035","\u0036","\u0037","\u0038","\u0039","\u003A","\u003B","\u003C","\u003D","\u003E","\u003F","\u0040","\u0041","\u0042","\u0043","\u0044","\u0045","\u0046","\u0047","\u0048","\u0049","\u004A","\u004B","\u004C","\u004D","\u004E","\u004F","\u0050","\u0051","\u0052","\u0053","\u0054","\u0055","\u0056","\u0057","\u0058","\u0059","\u005A","\u005B","\u005C","\u005D","\u005E","\u005F","\u0060","\u0061","\u0062","\u0063","\u0064","\u0065","\u0066","\u0067","\u0068","\u0069","\u006A","\u006B","\u006C","\u006D","\u006E","\u006F"," |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs"); | |
| const { unicode } = require("./Unicode"); | |
| const args = process.argv.slice(2); | |
| const propertyEscape = args[0]; | |
| let ret = `const ${propertyEscape.toLowerCase()} = [`; | |
| const regex = new RegExp(`\\p{${propertyEscape}}`, "gu"); | |
| for (let i = 0; i < unicode.length; i++) { | |
| if (unicode[i].match(regex)) { |
OlderNewer