You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

fj-ifelse

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fj-ifelse - npm Package Compare versions

Comparing version
1.0.1
to
1.1.0
+11
-5
index.js

@@ -8,7 +8,13 @@ "use strict";

function _ifElse(pred, then, otherwise) {
if (pred() === true) {
return then();
} else {
return otherwise();
}
return function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (pred.apply(null, args) === true) {
return then.apply(null, args);
} else {
return otherwise.apply(null, args);
}
};
}

@@ -15,0 +21,0 @@

{
"name": "fj-ifelse",
"version": "1.0.1",
"version": "1.1.0",
"description": "Functional ifElse",

@@ -5,0 +5,0 @@ "main": "index.js",

+11
-11

@@ -12,17 +12,17 @@ "use strict";

ifElse(function () {
return true;
ifElse(function (x, y) {
return x === y;
}, function (x, y) {
return t.equals(x, y);
}, function () {
return t.ok(true);
}, function () {
return t.fail();
});
})(true, true);
ifElse(function () {
return false;
ifElse(function (x) {
return x === true;
}, function () {
return t.fail();
}, function () {
return t.ok(true);
});
}, function (x) {
return t.ok(x === false);
})(false);

@@ -37,3 +37,3 @@ var ifTrue = ifElse(function () {

return t.fail();
});
})();
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet