diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-01-01 16:41:45 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-01-01 16:41:45 +1300 |
commit | b09dbbe20934e0da9fe45e254f74719e5e63423f (patch) | |
tree | 7d2abd0dc249be85393e6523a321fef72a462c0a /web/src/js/store/view.js | |
parent | fa77fba37cf2823195a6e40ab0ba0f8bb741d634 (diff) | |
download | mitmproxy-b09dbbe20934e0da9fe45e254f74719e5e63423f.tar.gz mitmproxy-b09dbbe20934e0da9fe45e254f74719e5e63423f.tar.bz2 mitmproxy-b09dbbe20934e0da9fe45e254f74719e5e63423f.zip |
Replace custom EventEmitter with one from browserify
Diffstat (limited to 'web/src/js/store/view.js')
-rw-r--r-- | web/src/js/store/view.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/src/js/store/view.js b/web/src/js/store/view.js index e96d1bcc..b5db9287 100644 --- a/web/src/js/store/view.js +++ b/web/src/js/store/view.js @@ -1,5 +1,8 @@ + +var EventEmitter = require('events').EventEmitter; var _ = require("lodash"); + var utils = require("../utils.js"); function SortByStoreOrder(elem) { @@ -12,7 +15,7 @@ var default_filt = function(elem){ }; function StoreView(store, filt, sortfun) { - utils.EventEmitter.call(this); + EventEmitter.call(this); filt = filt || default_filt; sortfun = sortfun || default_sort; @@ -30,7 +33,7 @@ function StoreView(store, filt, sortfun) { this.recalculate(filt, sortfun); } -_.extend(StoreView.prototype, utils.EventEmitter.prototype, { +_.extend(StoreView.prototype, EventEmitter.prototype, { close: function () { this.store.removeListener("add", this.add); this.store.removeListener("update", this.update); |