mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2024-11-25 11:46:09 -07:00
19 lines
306 B
JavaScript
19 lines
306 B
JavaScript
|
'use strict';
|
||
|
var mimeDb = require('mime-db');
|
||
|
|
||
|
module.exports = function () {
|
||
|
var ret = {};
|
||
|
|
||
|
Object.keys(mimeDb).forEach(function (x) {
|
||
|
var val = mimeDb[x];
|
||
|
|
||
|
if (val.extensions && val.extensions.length > 0) {
|
||
|
val.extensions.forEach(function (y) {
|
||
|
ret[y] = x;
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
return ret;
|
||
|
};
|