Skip to content

Commit

Permalink
Merge branch 'greenkeeper-update-all'
Browse files Browse the repository at this point in the history
  • Loading branch information
fnogatz committed Dec 11, 2015
2 parents 86d503a + 4d0d79f commit eb88a3c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 28 deletions.
4 changes: 2 additions & 2 deletions dist/chr-wop.min.js

Large diffs are not rendered by default.

37 changes: 17 additions & 20 deletions dist/chr.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,11 @@ EventEmitter.prototype.emit = function(type) {
break;
// slower
default:
len = arguments.length;
args = new Array(len - 1);
for (i = 1; i < len; i++)
args[i - 1] = arguments[i];
args = Array.prototype.slice.call(arguments, 1);
handler.apply(this, args);
}
} else if (isObject(handler)) {
len = arguments.length;
args = new Array(len - 1);
for (i = 1; i < len; i++)
args[i - 1] = arguments[i];

args = Array.prototype.slice.call(arguments, 1);
listeners = handler.slice();
len = listeners.length;
for (i = 0; i < len; i++)
Expand Down Expand Up @@ -131,7 +124,6 @@ EventEmitter.prototype.addListener = function(type, listener) {

// Check for listener leak
if (isObject(this._events[type]) && !this._events[type].warned) {
var m;
if (!isUndefined(this._maxListeners)) {
m = this._maxListeners;
} else {
Expand Down Expand Up @@ -253,7 +245,7 @@ EventEmitter.prototype.removeAllListeners = function(type) {

if (isFunction(listeners)) {
this.removeListener(type, listeners);
} else {
} else if (listeners) {
// LIFO order
while (listeners.length)
this.removeListener(type, listeners[listeners.length - 1]);
Expand All @@ -274,15 +266,20 @@ EventEmitter.prototype.listeners = function(type) {
return ret;
};

EventEmitter.prototype.listenerCount = function(type) {
if (this._events) {
var evlistener = this._events[type];

if (isFunction(evlistener))
return 1;
else if (evlistener)
return evlistener.length;
}
return 0;
};

EventEmitter.listenerCount = function(emitter, type) {
var ret;
if (!emitter._events || !emitter._events[type])
ret = 0;
else if (isFunction(emitter._events[type]))
ret = 1;
else
ret = emitter._events[type].length;
return ret;
return emitter.listenerCount(type);
};

function isFunction(arg) {
Expand Down Expand Up @@ -2521,7 +2518,7 @@ function hash (ids) {
CHR.History = Runtime.History
CHR.Rule = Rule

CHR.version = '2.0.3'
CHR.version = '2.0.4'

CHR.noConflict = function () {
root.CHR = prevCHR
Expand Down
4 changes: 2 additions & 2 deletions dist/chr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/chrparser.min.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chr",
"version": "2.0.3",
"version": "2.0.4",
"description": "Interpreter for Constraint Handling Rules (CHR) in JavaScript",
"main": "src/index.js",
"scripts": {
Expand Down Expand Up @@ -39,8 +39,7 @@
"url": "git://github.com/fnogatz/CHR.js"
},
"devDependencies": {
"babelify": "^6.1.3",
"browserify": "^11.0.1",
"browserify": "^12.0.1",
"browserify-versionify": "^1.0.6",
"colors": "^1.0.3",
"envify": "^3.4.0",
Expand Down

0 comments on commit eb88a3c

Please sign in to comment.