The `ftp-response-parser` package provides a lightweight, streaming parser specifically designed for handling FTP server response format strings. It efficiently processes incoming FTP protocol messages, including multi-line responses, and emits structured JavaScript objects. Each emitted object includes the numeric status `code`, the full `text` of the response, and boolean flags `isMark` and `isError`. This library is currently at version 1.0.1, with its last update occurring over a decade ago. It functions as a classic Node.js `Stream` and is primarily differentiated by its low-overhead, event-driven approach to parsing continuous streams of FTP data, making it suitable for integration into custom FTP client implementations that require incremental response processing.
Verified import paths — ran on the pinned version, not inferred.
This package is CommonJS-only, exporting the `ResponseParser` class directly as the module's default export. Named imports or ESM default imports are not supported.
Demonstrates how to instantiate the `ResponseParser`, listen for `readable` events to process parsed FTP response objects, handle potential errors, and feed it a multi-line FTP response string, ensuring the stream is properly terminated.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.