Skip to content

Commit

Permalink
switch to extend app-base directly not compose-emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Apr 25, 2016
1 parent 9b4cb52 commit 579882a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'use strict'

var utils = require('./utils')
var AppBase = require('compose-emitter').ComposeEmitter
var AppBase = require('app-base').AppBase

/**
* > Initialize `AsyncSimpleIterator` with `options`.
Expand Down Expand Up @@ -54,11 +54,11 @@ function AsyncSimpleIterator (options) {
return new AsyncSimpleIterator(options)
}
this.defaultOptions(options)
AppBase.call(this, this.options)
this.on = this.compose('on')
this.off = this.compose('off')
this.once = this.compose('once')
this.emit = this.compose('emit')
AppBase.call(this)
this.on = utils.emitter.compose.call(this, 'on', this.options)
this.off = utils.emitter.compose.call(this, 'off', this.options)
this.once = utils.emitter.compose.call(this, 'once', this.options)
this.emit = utils.emitter.compose.call(this, 'emit', this.options)
}

AppBase.extend(AsyncSimpleIterator)
Expand All @@ -79,7 +79,7 @@ AppBase.define(AsyncSimpleIterator.prototype, 'defaultOptions', function default

opts = opts ? utils.extend(options, opts) : opts
opts = utils.extend({
emitter: new utils.Emitter(),
emitter: new utils.EventEmitter(),
settle: false
}, options, opts)

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"test": "standard && node test.js"
},
"dependencies": {
"compose-emitter": "^1.1.0",
"app-base": "github:tunnckocore/app-base",
"compose-emitter": "^1.2.0",
"eventemitter3": "^1.2.0",
"extend-shallow": "^2.0.1",
"is-typeof-error": "^1.1.0",
Expand Down
3 changes: 2 additions & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ require = utils // eslint-disable-line no-undef, no-native-reassign
* Lazily required module dependencies
*/

require('eventemitter3', 'Emitter')
require('compose-emitter', 'emitter')
require('eventemitter3', 'EventEmitter')
require('extend-shallow', 'extend')
require('is-typeof-error', 'isError')
require('sliced', 'slice')
Expand Down

0 comments on commit 579882a

Please sign in to comment.