Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

muri

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

muri - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

5

History.md
0.2.0 / 2013-01-09
==================
* changed; default db is now 'test'
0.1.0 / 2012-12-18

@@ -3,0 +8,0 @@ ==================

4

lib/index.js

@@ -20,3 +20,3 @@ // muri

const DEFAULT_PORT = 27017;
const DEFAULT_DB = 'admin';
const DEFAULT_DB = 'test';

@@ -35,3 +35,3 @@ /**

hosts: []
, db: 'admin'
, db: DEFAULT_DB
, options: {}

@@ -38,0 +38,0 @@ }

{
"name": "muri",
"version": "0.1.0",
"version": "0.2.0",
"description": "MongoDB URI parser",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -107,7 +107,7 @@

describe('database', function(){
it('defaults to admin', function(done){
it('default', function(done){
var val = muri('mongodb://localhost/');
assert.equal('admin', val.db);
assert.equal('test', val.db);
var val = muri('mongodb://localhost');
assert.equal('admin', val.db);
assert.equal('test', val.db);
done();

@@ -151,3 +151,3 @@ })

var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny');
assert.equal('admin', val.db);
assert.equal('test', val.db);
assert.deepEqual([{ dc: 'ny' }], val.options.readPreferenceTags);

@@ -199,3 +199,3 @@ done();

var val = muri('mongodb:///tmp/mongodb-27017.sock?safe=false');
assert.equal(val.db, 'admin')
assert.equal(val.db, 'test')
assert.ok(Array.isArray(val.hosts));

@@ -222,3 +222,3 @@ assert.equal(1, val.hosts.length);

var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock?safe=false');
assert.equal(val.db, 'admin')
assert.equal(val.db, 'test')
assert.ok(Array.isArray(val.hosts));

@@ -245,3 +245,3 @@ assert.equal(1, val.hosts.length);

var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock,/tmp/another-27018.sock?safe=false');
assert.equal(val.db, 'admin')
assert.equal(val.db, 'test')
assert.ok(Array.isArray(val.hosts));

@@ -248,0 +248,0 @@ assert.equal(2, val.hosts.length);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc