# mbox-parser

> Convert Mbox to js object

Latest version **1.0.1** (published 2021-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install mbox-parser
pnpm add mbox-parser
yarn add mbox-parser
bun add mbox-parser
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-04-09 |
| First published | 2021-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Maastrich |
| Maintainers | maastrich |

## Links

- npm: https://www.npmjs.com/package/mbox-parser
- Repository: https://github.com/Maastrich/mbox-to-json
- npm.io page: https://npm.io/package/mbox-parser

## Dependencies (3)

- [mailparser](https://npm.io/package/mailparser.md) ^3.0.1
- [@types/mailparser](https://npm.io/package/@types/mailparser.md) ^3.0.0
- [humanize-duration](https://npm.io/package/humanize-duration.md) ^3.25.1

## Recent versions

- 1.0.1 (latest) — 2021-04-09
- 1.0.0 — 2021-04-09

## README

# Mbox Parser

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

## Instalation

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

## Example 1:

Get all mails in a mbox file

```typescript
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

```typescript
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);
});
}
```

---
_Source: https://npm.io/package/mbox-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
