JS: Remove unsafe usage of X.prototype = new Y;

This commit is contained in:
Stefan Thomas
2013-04-23 23:02:06 +02:00
parent 56a7049b37
commit aca39652e2
5 changed files with 27 additions and 7 deletions

View File

@@ -9,6 +9,8 @@
// var network = require("./network.js");
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var Amount = require('./amount').Amount;
var UInt160 = require('./uint160').UInt160;
var Currency = require('./currency').Currency;
@@ -18,6 +20,8 @@ var extend = require('extend');
var OrderBook = function (remote,
currency_gets, issuer_gets,
currency_pays, issuer_pays) {
EventEmitter.call(this);
var self = this;
this._remote = remote;
@@ -70,7 +74,7 @@ var OrderBook = function (remote,
return this;
};
OrderBook.prototype = new EventEmitter;
util.inherits(OrderBook, EventEmitter);
/**
* List of events that require a remote subscription to the orderbook.