plugCubed/plugAPI — pull request #52 by saneki (2014-12-07 11:48:03+00:00)
Title: Reverse-compatible async login support

Calling `new PlugAPI(auth)` infinite-loop blocked for me (due to the sleep-wait loops), so I added support for async login that bypasses the sleep-wait madness. If a function is passed to PlugAPI as the second parameter it will be used as the callback and login will be performed asynchronously, otherwise it will act as before (synchronously).

I would recommend going the all-async route but I'm not sure how important reverse-compatibility is to the users of this project.