stars-profile 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/display.js +17 -1
package/package.json
CHANGED
package/src/display.js
CHANGED
|
@@ -13,9 +13,25 @@ const TYPE_COLORS = {
|
|
|
13
13
|
OTHER: 'white',
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
const TYPE_LABELS = {
|
|
17
|
+
SPEAKING: 'Speaking',
|
|
18
|
+
BLOGPOST: 'Blog Post',
|
|
19
|
+
ARTICLE_PUBLICATION: 'Article',
|
|
20
|
+
EVENT_ORGANIZATION: 'Event Organization',
|
|
21
|
+
HACKATHON: 'Hackathon',
|
|
22
|
+
OPEN_SOURCE_PROJECT: 'Open Source Project',
|
|
23
|
+
VIDEO_PODCAST: 'Video / Podcast',
|
|
24
|
+
FORUM: 'Forum',
|
|
25
|
+
OTHER: 'Other',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
function typeLabel(type) {
|
|
29
|
+
return TYPE_LABELS[type] || type;
|
|
30
|
+
}
|
|
31
|
+
|
|
16
32
|
function colorType(type) {
|
|
17
33
|
const color = TYPE_COLORS[type] || 'white';
|
|
18
|
-
return chalk[color](type.padEnd(22));
|
|
34
|
+
return chalk[color](typeLabel(type).padEnd(22));
|
|
19
35
|
}
|
|
20
36
|
|
|
21
37
|
function truncate(str, len) {
|