@d4data/mbox-parser
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Mbox Parser

mbox-tparser is a really simple package to transform mbox files to js object.

Instalation

yarn add mbox-parser
# or
npm install mbox-parser

Example 1:

Get all mails in a mbox file

import { mboxParser } from "mbox-parser";

// here stream is a ReadStream to your mbox file
mboxParser(stream).then((mails) => {
  console.log(mails);
});

Example 2:

Get a specific page of a specific size in your mbox file

First page is at number 1

import { mboxParser } from "mbox-parser";

// here stream is a ReadStream to your mbox file
mboxParser(stream, {
  pageSize: 20, // Number of mail to return
  pageNumber: 4 // Index of the 'page' you want
}).then((mails) => {
  console.log(mails);
});
}

Readme

Keywords

none

Package Sidebar

Install

npm i @d4data/mbox-parser

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

19.2 kB

Total Files

18

Last publish

Collaborators

  • maastrich-owner
  • super-bunny
  • sugar-engineering
  • salt_industry
  • thalusa