1Introduction
- description:Node mime(Multipurpose Internet Mail Extensions)
- author:ydr.me
- create:2014-11-21 09:41
- update:2014-11-21 09:41
- github:https://github.com/blearjs/blear.node.template
2Example
var mime = require('blear.node.mime');
3Static
3.1.get(extname, defaultContentType): contentType
根据扩展名获取 MIME。
mine.get('.jpg');
// => "image/jpeg"
mine.get('xxxxxx');
// => "application/octet-stream"
mine.get('xxxxxx', 'what');
// => "what"
3.2.set(extname, contentType): map
根据扩展名设置 MIME。
mine.set('.900', 'yyy');
// => {map}
mine.get('.900', 'zzz')
// => "yyy"
4Dependencies
- 无依赖
5Reference
无。