Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ronomon/mime

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ronomon/mime

Fast, robust, compliant MIME decoder.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mime

Fast, robust, compliant MIME decoder. Ships with extensive tests and fuzz tests.

Standards Compliant

  • RFC 5322 - Internet Message Format.

  • RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies.

  • RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types.

  • RFC 2047 - MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text.

  • RFC 2183 - The Content-Disposition Header Field.

  • RFC 2231 - MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations.

Installation

npm install @ronomon/mime

Usage

Decoding

MIME decodes on demand only as much as necessary to access a particular property. For example, if you need mime.subject, then MIME will search for the end of the headers, and then decode only the subject, and not all other headers, or the body.

var MIME = require('@ronomon/mime');
var mime = new MIME.Message(buffer);

mime.headers;
mime.body;

mime.from;
mime.to;
mime.cc;
mime.bcc;
mime.date;
mime.subject;
mime.parts;

Tests

To run all included tests:

node test.js

Keywords

FAQs

Package last updated on 20 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc