Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

imap-parser

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imap-parser

A parser for IMAP line based commands

Source
npmnpm
Version
0.0.0
Version published
Weekly downloads
136
5.43%
Maintainers
1
Weekly downloads
 
Created
Source

imap-parser

IMAP command parser for use on both client and server. This is based on work in andris9/inbox and provides a parser for IMAP line based commands.

Build Status

Installation

$ npm install imap-parser

API

To create an instance of the line parser:

var Parser = require('imap-parser')
var parser = new Parser()

The parser is a writable stream with some extensions.

Methods

Parser#write(data)

Write some data to be parsed.

Parser#writeLiteral(data)

If a literal occurs ({123}\r\n) do not parse it, since the length is known. Just add it separately and it will included as the node value instead of length property.

Parser#end([data])

Mark the end of the data, optionally passing one last chunk of data to be parsed.

Parser#finalize()

Generates and returns a structured object with the data currently known. Useful if you need to check parse status in the middle of the process

Events

To register for these events, do:

parser.on('EventName', function (data) {
  
})

log

Is emitted with a string as its data. This string is the entire unparsed content of the line.

line

Is emitted with a structured array as its data. This array is the result of parsing the line.

Licence

MIT

Keywords

IMAP

FAQs

Package last updated on 18 May 2013

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