Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Work without Optional Dependencies #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/event_emitter2_ascoltatore.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var AbstractAscoltatore = require("./abstract_ascoltatore");
var util = require("./util");
var defer = util.defer;
var debug = require("debug")("ascoltatori:ee2");
var EventEmitter2 = require("eventemitter2").EventEmitter2;
var ascoltatori = require('./ascoltatori');

/**
Expand All @@ -19,6 +18,8 @@ function EventEmitter2Ascoltatore(settings) {
wildcardSome: '**'
});

var EventEmitter2 = require("eventemitter2").EventEmitter2;

this._event = new EventEmitter2({
delimiter: this._separator,
wildcard: true
Expand Down
7 changes: 4 additions & 3 deletions lib/mongo_ascoltatore.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ var TrieAscoltatore = require("./trie_ascoltatore");
var AbstractAscoltatore = require('./abstract_ascoltatore');
var SubsCounter = require("./subs_counter");
var debug = require("debug")("ascoltatori:mongodb");
var mongo = require('mongodb');
var MongoClient = require('mongodb').MongoClient;
var ObjectID = require('mongodb').ObjectID;
var steed = require("steed");

/**
Expand All @@ -24,6 +21,10 @@ var steed = require("steed");
* @param {Object} opts The options object
*/
var MongoAscoltatore = function(opts) {
var mongo = require('mongodb');
var MongoClient = require('mongodb').MongoClient;
var ObjectID = require('mongodb').ObjectID;

AbstractAscoltatore.call(this);

if (typeof opts.db === 'string' || opts.uri) {
Expand Down