https://github.com/lsongdev/mime-js
MIME protocol
https://github.com/lsongdev/mime-js
mime mime-message mime-types
Last synced: 3 months ago
JSON representation
MIME protocol
- Host: GitHub
- URL: https://github.com/lsongdev/mime-js
- Owner: lsongdev
- License: mit
- Created: 2018-09-19T08:34:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-17T11:38:26.000Z (over 3 years ago)
- Last Synced: 2025-02-13T22:23:44.069Z (4 months ago)
- Topics: mime, mime-message, mime-types
- Language: JavaScript
- Homepage: https://npmjs.org/mime2
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## mime2 [](https://npmjs.org/mime2)
> MIME in node.js
### Installation
```bash
$ npm i mime2
```### Example
```js
const MIME = require('mime2');var mime = new MIME();
mime.on('header', function(headers){
console.log('headers', headers);
});mime.on('body', function(body){
console.log('body', body);
});fs.createReadStream('mail.txt').pipe(mime);
```
### Contributing
- Fork this Repo first
- Clone your Repo
- Install dependencies by `$ npm install`
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Publish your local branch, Open a pull request
- Enjoy hacking <3### MIT
This work is licensed under the [MIT license](./LICENSE).
---