UNPKG

1.7 kBJavaScriptView Raw
1'use strict';
2
3const isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
4const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
5const isLinux = typeof process !== 'undefined' && process.platform === 'linux';
6
7const common = {
8 ballotDisabled: '☒',
9 ballotOff: '☐',
10 ballotOn: '☑',
11 bullet: '•',
12 bulletWhite: '◦',
13 fullBlock: '█',
14 heart: '❤',
15 identicalTo: '≡',
16 line: '─',
17 mark: '※',
18 middot: '·',
19 minus: '-',
20 multiplication: '×',
21 obelus: '÷',
22 pencilDownRight: '✎',
23 pencilRight: '✏',
24 pencilUpRight: '✐',
25 percent: '%',
26 pilcrow2: '❡',
27 pilcrow: '¶',
28 plusMinus: '±',
29 question: '?',
30 section: '§',
31 starsOff: '☆',
32 starsOn: '★',
33 upDownArrow: '↕'
34};
35
36const windows = Object.assign({}, common, {
37 check: '√',
38 cross: '×',
39 ellipsisLarge: '...',
40 ellipsis: '...',
41 info: 'i',
42 questionSmall: '?',
43 pointer: '>',
44 pointerSmall: '»',
45 radioOff: '( )',
46 radioOn: '(*)',
47 warning: '‼'
48});
49
50const other = Object.assign({}, common, {
51 ballotCross: '✘',
52 check: '✔',
53 cross: '✖',
54 ellipsisLarge: '⋯',
55 ellipsis: '…',
56 info: 'ℹ',
57 questionFull: '?',
58 questionSmall: '﹖',
59 pointer: isLinux ? '▸' : '❯',
60 pointerSmall: isLinux ? '‣' : '›',
61 radioOff: '◯',
62 radioOn: '◉',
63 warning: '⚠'
64});
65
66module.exports = (isWindows && !isHyper) ? windows : other;
67Reflect.defineProperty(module.exports, 'common', { enumerable: false, value: common });
68Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows });
69Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other });