-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathline-strings.ts
More file actions
33 lines (29 loc) · 774 Bytes
/
line-strings.ts
File metadata and controls
33 lines (29 loc) · 774 Bytes
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
/**
* Represents an object that contains the
* actual strings used to render the tree
*/
export interface LineStringSet {
/** The string to render immediately before non-last children */
CHILD: string;
/** The string to render immediately before the last child */
LAST_CHILD: string;
/** The string to render for parent directories */
DIRECTORY: string;
/** The string to render for empty space */
EMPTY: string;
}
/** Contains all strings for tree rendering */
export const LINE_STRINGS: { [charset: string]: LineStringSet } = {
ascii: {
CHILD: '|-- ',
LAST_CHILD: '`-- ',
DIRECTORY: '| ',
EMPTY: ' ',
},
'utf-8': {
CHILD: '├── ',
LAST_CHILD: '└── ',
DIRECTORY: '│ ',
EMPTY: ' ',
},
};