2.1.0 • Published 3 years ago

mbox-to-json v2.1.0

Weekly downloads
14
License
MIT
Repository
github
Last release
3 years ago

Mbox To Json

mbox-to-json is a really simple package to transform mbox files to json.

Instalation

yarn add mbox-to-json
# or
npm install mbox-to-json

If you are using typescript please run

yarn add -D @types/mbox-to-json
# or
npm install @types/mbox-to-json --save-dev

Example 1:

Get all mails in a mbox file

import { mboxParser } from "../src/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 "../src/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);
});
}
2.1.0

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago