Check
This command requests the IMAP server to do some maintenance on the mailbox. It is weird for a client to be able to request this, and it basically isn't used anywhere, however it is included due to it being in the RFC 3501 spec.
info
The latest IMAP spec (RFC 9051, published in 2021) removes the CHECK command. When the server advertises IMAP4rev2, check() throws an error instead of sending the command — use NOOP or IDLE instead.
Usage
let responses = await imap.check() // IMAP4rev1 servers only
Response
Returns the untagged response lines received while processing the command (usually an empty array).