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

mbox-json

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mbox-json

Parses MBOX file to JSON

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

mbox-json

Parses MBOX file to JSON

Mail Labels (e.g. Time, From, Received, etc.) become attributes.

https://nodei.co/npm/mbox-json.png?downloads=true&downloadRank=true&stars=true

Build Status contributions welcome

install

npm install mbox-json

example

var mboxJSON = require('mbox-json');

mboxJSON.parse(__dirname + '/Chat.mbox', function(data){
	console.log(data); // prints array of messages
	console.log(data[0]); // prints first message
	console.log(data[0].Time); // prints timestamp of when first message was sent
	console.log(data[0].From); // prints sender of first message
	console.log(data[0]['Content-Type']); // prints content type of first message
	console.log(data[0].Message); // prints message content of first message
});

api

parse(callback)

Type: function

Calls back with object containing array of messages.

data

Type: array

Message objects.

messageObject['Time']

Type: string

Time that message was sent.

messageObject['From']

Type: string

Sender of message.

messageObject['Content-Type']

Type: string

Content Type of message.

messageObject['Message']

Type: string

Content of message.

license

MIT © Rishi Masand

Keywords

FAQs

Package last updated on 30 Nov 2016

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