Mongoose: the function "once"
mongoose
Solution
A Mongoose connection is an instance of EventEmitter class. From the documentation:
Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.
Problem
In the "Getting Started" of Mongoose (http://mongoosejs.com/docs/index.html) there is an example that use the function `once`: ``` db.once('open', function callback () { // yay! }); ``` but in the official documentation I don't find any reference to function `once` (http://mongoosejs.com/docs/api.html). What is the meaning of this function?