Comparing version 0.0.0 to 0.0.1
18
index.js
@@ -40,8 +40,7 @@ /** | ||
, _addListener: emitter.addListener.bind(emitter) | ||
, emit: emit.bind(this) | ||
, emit: emit.bind(emitter) | ||
, _emit: emitter.emit.bind(emitter) | ||
, next: next.bind(this) | ||
, queue: queue.bind(this) | ||
, dequeue: dequeue.bind(this) | ||
, queueing: queueing.bind(this) | ||
, queue: queue.bind(emitter) | ||
, dequeue: dequeue.bind(emitter) | ||
, queueing: queueing.bind(emitter) | ||
, _queueing: [] | ||
@@ -85,8 +84,7 @@ , _cache: {} | ||
var cache = this.cache[uuid.v4()] = { | ||
var cache = this.quevent._cache[uuid.v4()] = { | ||
arguments: arguments | ||
, working: this.listeners(event).length | ||
}; | ||
arguments.unshift(done.bind(this, cache)); | ||
arguments.splice(1, 0, done.bind(this, cache)); | ||
this.quevent._emit.apply(this, arguments); | ||
@@ -103,4 +101,4 @@ | ||
if(0 === --cache.working) { | ||
arguments[0] = "quevent:" + arguments[0]; | ||
this.quevent._emit.apply(this, arguments); | ||
cache.arguments[0] = "quevent:" + cache.arguments[0]; | ||
this.quevent._emit.apply(this, cache.arguments); | ||
} | ||
@@ -107,0 +105,0 @@ } |
{ | ||
"name": "quevent", | ||
"description": "Pile up events and execute them later", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"author": "Jan Buschtöns <buschtoens@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
6239
6
156