-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathunprintables.js
executable file
·97 lines (89 loc) · 2.57 KB
/
unprintables.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// characters that should never be printed by code
export default new Set([
// ascii control
0x00, // NULL
0x01, // START OF HEADING
0x02, // START OF TEXT
0x03, // END OF TEXT
0x04, // END OF TRANSMISSION
0x05, // ENQUIRY
0x06, // ACKNOWLEDGE
0x07, // BELL
0x08, // BACKSPACE
0x09, // CHARACTER TABULATION
0x0A, // LINE FEED (LF)
0x0B, // LINE TABULATION
0x0C, // FORM FEED (FF)
0x0D, // CARRIAGE RETURN (CR)
0x0E, // SHIFT OUT
0x0F, // SHIFT IN
0x10, // DATA LINK ESCAPE
0x11, // DEVICE CONTROL ONE
0x12, // DEVICE CONTROL TWO
0x13, // DEVICE CONTROL THREE
0x14, // DEVICE CONTROL FOUR
0x15, // NEGATIVE ACKNOWLEDGE
0x16, // SYNCHRONOUS IDLE
0x17, // END OF TRANSMISSION BLOCK
0x18, // CANCEL
0x19, // END OF MEDIUM
0x1A, // SUBSTITUTE
0x1B, // ESCAPE
0x1C, // INFORMATION SEPARATOR FOUR
0x1D, // INFORMATION SEPARATOR THREE
0x1E, // INFORMATION SEPARATOR TWO
0x1F, // INFORMATION SEPARATOR ONE
0x7F, // DELETE
0x80, // <control>
0x81, // <control>
0x82, // BREAK PERMITTED HERE
0x83, // NO BREAK HERE
0x84, // <control>
0x85, // NEXT LINE (NEL)
0x86, // START OF SELECTED AREA
0x87, // END OF SELECTED AREA
0x88, // CHARACTER TABULATION SET
0x89, // CHARACTER TABULATION WITH JUSTIFICATION
0x8A, // LINE TABULATION SET
0x8B, // PARTIAL LINE FORWARD
0x8C, // PARTIAL LINE BACKWARD
0x8D, // REVERSE LINE FEED
0x8E, // SINGLE SHIFT TWO
0x8F, // SINGLE SHIFT THREE
0x90, // DEVICE CONTROL STRING
0x91, // PRIVATE USE ONE
0x92, // PRIVATE USE TWO
0x93, // SET TRANSMIT STATE
0x94, // CANCEL CHARACTER
0x95, // MESSAGE WAITING
0x96, // START OF GUARDED AREA
0x97, // END OF GUARDED AREA
0x98, // START OF STRING
0x99, // <control>
0x9A, // SINGLE CHARACTER INTRODUCER
0x9B, // CONTROL SEQUENCE INTRODUCER
0x9C, // STRING TERMINATOR
0x9D, // OPERATING SYSTEM COMMAND
0x9E, // PRIVACY MESSAGE
0x9F, // APPLICATION PROGRAM COMMAND
// zero width
0x200B, // () ZERO WIDTH SPACE
0x200C, // () ZERO WIDTH NON-JOINER
0x200D, // () ZERO WIDTH JOINER
// whitespace
0x2028, // LINE SEPARATOR
0x2029, // PARAGRAPH SEPARATOR
// bidi control
0x61C, // ARABIC LETTER MARK
0x200E, // LEFT-TO-RIGHT MARK
0x200F, // RIGHT-TO-LEFT MARK
0x202A, // LEFT-TO-RIGHT EMBEDDING
0x202B, // RIGHT-TO-LEFT EMBEDDING
0x202C, // POP DIRECTIONAL FORMATTING
0x202D, // LEFT-TO-RIGHT OVERRIDE
0x202E, // RIGHT-TO-LEFT OVERRIDE
0x2066, // LEFT-TO-RIGHT ISOLATE
0x2067, // RIGHT-TO-LEFT ISOLATE
0x2068, // FIRST STRONG ISOLATE
0x2069, // POP DIRECTIONAL ISOLATE
]);