blob: c56f1503fe4bf916aa2e0c535c2433bb6442590b (
plain)
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
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getDescription;
var _lodash = require('lodash');
var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const DB = {
loader: {
get: loader => _lodash2.default.startCase(loader)
},
ext: {
get: ext => `${ext} files`,
vue: 'Vue Single File components',
js: 'JavaScript files',
sass: 'SASS files',
scss: 'SASS files',
unknown: 'Unknown files'
}
};
function getDescription(category, keyword) {
if (!DB[category]) {
return _lodash2.default.startCase(keyword);
}
if (DB[category][keyword]) {
return DB[category][keyword];
}
if (DB[category].get) {
return DB[category].get(keyword);
}
return '-';
}
|