Permalink
Browse files

removed obsolete null emitter

  • Loading branch information...
1 parent 4be6547 commit 06fd640e259b030b9e62916e336903c9ff10ec74 @sdepold committed Jul 5, 2012
Showing with 3 additions and 20 deletions.
  1. +3 −2 lib/dao-factory.js
  2. +0 −18 lib/emitters/null-emitter.js
View
@@ -103,8 +103,9 @@ module.exports = (function() {
DAOFactory.prototype.find = function(options) {
if([null, undefined].indexOf(options) > -1) {
- var NullEmitter = require("./emitters/null-emitter")
- return new NullEmitter()
+ return new Utils.CustomEventEmitter(function(emitter) {
+ setTimeout(function() { emitter.emit('success', null) }, 10)
+ }).run()
}
// options is not a hash but an id
@@ -1,18 +0,0 @@
-var Utils = require("../utils")
-
-module.exports = (function(){
- var NullEmitter = function(delay) {
- var self = this
-
- delay = delay || 10
- setTimeout(function() { self.emitNull() }, delay)
- }
- Utils.addEventEmitter(NullEmitter)
-
- NullEmitter.prototype.emitNull = function() {
- this.emit('success', null)
- this.emit('error', null)
- }
-
- return NullEmitter
-})()

0 comments on commit 06fd640

Please sign in to comment.