build.js 231 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 var db = require('mime-db'); var mapByType = {}; Object.keys(db).forEach(function(key) { var extensions = db[key].extensions; if (extensions) { mapByType[key] = extensions; } }); console.log(JSON.stringify(mapByType));