Pull request contains updates mainly to the connect method, no breaking changes. If callback is not included in call to connect a Promise is created and returned.
A few minor additional adjustments have been made:
Updated lodash to get rid of a warning from npm audit.
Added option.useMongoClient = true to get rid of deprecation warning.
I added a STATES object which is just a map for the mongoose.connection.readyState values (only changed value in the connect code though (for now)) and also changed the in-parameters of the connect method and added JSDocs for it.
Pull request contains updates mainly to the
connect
method, no breaking changes. If callback is not included in call toconnect
aPromise
is created and returned.A few minor additional adjustments have been made:
option.useMongoClient = true
to get rid of deprecation warning.I added a
STATES
object which is just a map for themongoose.connection.readyState
values (only changed value in the connect code though (for now)) and also changed the in-parameters of the connect method and added JSDocs for it.This does not fully solve #12, but it's a start.