3.0.3 • Published 4 years ago

mongodb-url v3.0.3

Weekly downloads
2,559
License
Apache-2.0
Repository
github
Last release
4 years ago

mongodb-url

How MongoDB URL's work.

Example

var parse = require('mongodb-url');
parse('localhost:27017')
>>> { dbName: 'admin', servers: [ { host: 'localhost', port: 27017 } ] }
parse('mongodb://localhost:27017')
>>> { dbName: 'admin', servers: [ { host: 'localhost', port: 27017 } ] }

Install

npm install --save mongodb-url

Test

npm test

License

Apache 2