You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
231 B

7 years ago
  1. var db = require('mime-db');
  2. var mapByType = {};
  3. Object.keys(db).forEach(function(key) {
  4. var extensions = db[key].extensions;
  5. if (extensions) {
  6. mapByType[key] = extensions;
  7. }
  8. });
  9. console.log(JSON.stringify(mapByType));