Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mime => mime-types #33

Merged
merged 1 commit into from
Oct 19, 2016
Merged

mime => mime-types #33

merged 1 commit into from
Oct 19, 2016

Conversation

matheuss
Copy link
Member

@matheuss matheuss commented Oct 19, 2016

import path from 'path'
import mime from 'mime-types'

const file = 'list/package.json'
const contentType = mime.contentType(path.extname(file))

console.log(contentType)
//=> application/json; charset=utf-8

πŸ’― ✨

@leo
Copy link
Contributor

leo commented Oct 19, 2016

What's the difference? πŸ˜„

@matheuss
Copy link
Member Author

You don't have to append the charset to it πŸ˜…

@leo leo merged commit 530994f into vercel:master Oct 19, 2016
@leo
Copy link
Contributor

leo commented Oct 19, 2016

Ahh! Thanks! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants