{"action":"created","issue":{"url":"https://api.github.com/repos/jshttp/mime-db/issues/20","labels_url":"https://api.github.com/repos/jshttp/mime-db/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/jshttp/mime-db/issues/20/comments","events_url":"https://api.github.com/repos/jshttp/mime-db/issues/20/events","html_url":"https://github.com/jshttp/mime-db/issues/20","id":56935207,"number":20,"title":"Better way to manage extension priority for multiple types","user":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jshttp/mime-db/labels/discuss","name":"discuss","color":"02d7e1"},{"url":"https://api.github.com/repos/jshttp/mime-db/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-02-08T02:10:38Z","updated_at":"2015-02-09T02:25:51Z","closed_at":null,"body":"We need a better way to manage extension priority for multiple types (i.e. provide an extension -> mime mapping)."},"comment":{"url":"https://api.github.com/repos/jshttp/mime-db/issues/comments/73448855","html_url":"https://github.com/jshttp/mime-db/issues/20#issuecomment-73448855","issue_url":"https://api.github.com/repos/jshttp/mime-db/issues/20","id":73448855,"user":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T02:25:51Z","updated_at":"2015-02-09T02:25:51Z","body":"I am debating between two different APIs here:\r\n\r\n  1. `require('mime-db')` will look the exact same, but there will be a new, non-enumerable property `require('mime-db').extensions` that will contain the extension map. **Pro** is backward-compatible with all the modules that depend on this library on npm. **Con** it's mixing things together.\r\n  2. Just make `require('mime-db')` no longer be a direct mapping to the `db.json` file, but rather place it at a property (like `require('mime-db').types`). **Pro** better separation of concerns and fits ES6 modules a little better. **Con** requires a major version bump.\r\n\r\nI'm putting this out here in case anyone has opinions on it.\r\n\r\n/cc @Fishrock123 @jonathanong @broofa "}}