title: How to get mongoDB database name from uri string
body: <p>I am using mongodb native driver:</p>
  
  <pre><code>"mongodb": "^2.2.33",
  </code></pre>
  
  <p>And trying to retrieve the name of the database from uri...</p>
  
  <p>I tried something like this:</p>
  
  <pre><code>const Mongodb = require('mongodb')
  let mongoUrl = new Mongodb.create(opts.mongo.url);
  console.log(mongoUrl.databaseName);
  </code></pre>
  
  <p>But not working, any solution for this?</p>