不要怂,就是干,撸起袖子干!

Commit 0a41a8f4 by Mick Hansen

each -> foreaceh

1 parent b095535e
Showing with 2 additions and 1 deletions
var util = require("util")
, EventEmitter = require("events").EventEmitter
, proxyEventKeys = ['success', 'error', 'sql']
module.exports = (function() {
var CustomEventEmitter = function(fct) {
......@@ -41,7 +42,7 @@ module.exports = (function() {
}
CustomEventEmitter.prototype.proxy = function(emitter) {
['success', 'error', 'sql'].each(function (eventKey) {
proxyEventKeys.forEach(function (eventKey) {
this.on(eventKey, function (result) {
emitter.emit(eventKey, result)
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!