PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@celo/contractkit/node_modules/fp-ts/lib
Просмотр файла: function.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @since 2.0.0
*/
function identity(a) {
return a;
}
exports.identity = identity;
/**
* @since 2.0.0
*/
exports.unsafeCoerce = identity;
/**
* @since 2.0.0
*/
function not(predicate) {
return function (a) { return !predicate(a); };
}
exports.not = not;
/**
* @since 2.0.0
*/
function constant(a) {
return function () { return a; };
}
exports.constant = constant;
/**
* A thunk that returns always `true`
*
* @since 2.0.0
*/
exports.constTrue = function () {
return true;
};
/**
* A thunk that returns always `false`
*
* @since 2.0.0
*/
exports.constFalse = function () {
return false;
};
/**
* A thunk that returns always `null`
*
* @since 2.0.0
*/
exports.constNull = function () {
return null;
};
/**
* A thunk that returns always `undefined`
*
* @since 2.0.0
*/
exports.constUndefined = function () {
return;
};
/**
* A thunk that returns always `void`
*
* @since 2.0.0
*/
exports.constVoid = function () {
return;
};
/**
* Flips the order of the arguments of a function of two arguments.
*
* @since 2.0.0
*/
function flip(f) {
return function (b, a) { return f(a, b); };
}
exports.flip = flip;
function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
switch (arguments.length) {
case 1:
return ab;
case 2:
return function () {
return bc(ab.apply(this, arguments));
};
case 3:
return function () {
return cd(bc(ab.apply(this, arguments)));
};
case 4:
return function () {
return de(cd(bc(ab.apply(this, arguments))));
};
case 5:
return function () {
return ef(de(cd(bc(ab.apply(this, arguments)))));
};
case 6:
return function () {
return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
};
case 7:
return function () {
return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
};
case 8:
return function () {
return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
};
case 9:
return function () {
return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
};
}
}
exports.flow = flow;
/**
* @since 2.0.0
*/
function tuple() {
var t = [];
for (var _i = 0; _i < arguments.length; _i++) {
t[_i] = arguments[_i];
}
return t;
}
exports.tuple = tuple;
/**
* @since 2.0.0
*/
function increment(n) {
return n + 1;
}
exports.increment = increment;
/**
* @since 2.0.0
*/
function decrement(n) {
return n - 1;
}
exports.decrement = decrement;
/**
* @since 2.0.0
*/
function absurd(_) {
throw new Error('Called `absurd` function which should be uncallable');
}
exports.absurd = absurd;
Выполнить команду
Для локальной разработки. Не используйте в интернете!