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.
Installation
$ npm install imap-parser
API
To create an instance of the line parser:
var Parser = var parser =
The parser is a writable & readable stream. Just pipe the data stream from the TCP connection in and read the parsed lines out as data
events. Each data event contains an array with the parsed data for a line. String literals are also handled more or less automatically (see caviat in events).
Events
log
Is emitted with a string as its data. This string is the entire unparsed content of the line. It is useful for logging:
parser
literal
Is emitted when the client is sending a literal to the server but is waiting for a command continuation request:
parser
Licence
MIT