Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug fix: copy-paste errors in util.js

  • Loading branch information...
commit 174d29133c6e6464986c32e9d71f859194b21dd9 1 parent eab6546
@wuher wuher authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 lib/util.js
View
16 lib/util.js
@@ -593,7 +593,7 @@ exports.all = exports.operator('all', 1, function (array) {
return true;
});
-exports.any = exports.operator('all', 1, function (array) {
+exports.any = exports.operator('any', 1, function (array) {
array = exports.array.coerce(array);
for (var i = 0; i < array.length; i++)
if (array[i])
@@ -709,15 +709,15 @@ exports.gt = exports.operator('gt', 2, function (a, b) {
return !(exports.lt(a, b) || exports.eq(a, b));
});
-exports.le = exports.operator(2, 'le', function (a, b) {
+exports.le = exports.operator('le', 2, function (a, b) {
return exports.lt(a, b) || exports.eq(a, b);
});
-exports.ge = exports.operator(2, 'ge', function (a, b) {
+exports.ge = exports.operator('ge', 2, function (a, b) {
return !exports.lt(a, b);
});
-exports.mul = exports.operator(2, 'mul', function (a, b) {
+exports.mul = exports.operator('mul', 2, function (a, b) {
if (typeof a == "string")
return exports.string.mul(a, b);
return a * b;
@@ -758,7 +758,7 @@ exports.by = function (relation) {
return comparator;
};
-exports.compare = exports.operator(2, 'compare', function (a, b) {
+exports.compare = exports.operator('compare', 2, function (a, b) {
if (exports.no(a) !== exports.no(b))
return exports.no(b) - exports.no(a);
if (typeof a === "number" && typeof b === "number")
@@ -813,11 +813,11 @@ exports.reversed = function (array) {
return exports.reverse(exports.array.copy(array));
};
-exports.hash = exports.operator(1, 'hash', function (object) {
+exports.hash = exports.operator('hash', 1, function (object) {
return '' + object;
});
-exports.unique = exports.operator(1, 'unique', function (array, eq, hash) {
+exports.unique = exports.operator('unique', 1, function (array, eq, hash) {
var visited = {};
if (!eq) eq = exports.eq;
if (!hash) hash = exports.hash;
@@ -834,7 +834,7 @@ exports.unique = exports.operator(1, 'unique', function (array, eq, hash) {
// string
-exports.string = exports.operator(1, 'toString', function (object) {
+exports.string = exports.operator('toString', 1, function (object) {
return '' + object;
});
Please sign in to comment.
Something went wrong with that request. Please try again.