UNPKG

tastypie

Version:

Tastypie is a webservice API framework for Node.js based on Django's Tastypie Framework. It provides a convenient, yet powerful and highly customizable, abstraction for creating REST-style interfaces

12 lines (9 loc) 231 B
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));