Comparing version 0.8.3 to 0.8.4
(function () { | ||
'use strict'; | ||
var Util = require('util.io'), | ||
var Util = require('../util'), | ||
fs = require('fs'), | ||
@@ -27,3 +27,3 @@ zlib = require('zlib'); | ||
p = params, | ||
func = Util.exec.ret(p.callback), | ||
func = p.callback, | ||
options = { | ||
@@ -75,7 +75,12 @@ bufferSize: 4 * 1024 | ||
function on(event, emitter, callback) { | ||
var listeners = emitter.listeners(event), | ||
indexOf = listeners.indexOf(callback); | ||
var isSet, | ||
listeners = emitter.listeners(event), | ||
callbackStr = '' + callback; | ||
if (!~indexOf) | ||
emitter.once(event, callback); | ||
isSet = listeners.some(function(func) { | ||
return '' + func === callbackStr; | ||
}); | ||
if (!isSet) | ||
emitter.on(event, callback); | ||
} | ||
@@ -82,0 +87,0 @@ |
{ | ||
"name": "pipe-io", | ||
"version": "0.8.3", | ||
"version": "0.8.4", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "Pipe streams and handle events", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6397
124