Skip to main content
Glama

mcp-appstore

by appreply-co
ifElse.js1.39 kB
var _curry3 = require('./internal/_curry3'); var curryN = require('./curryN'); /** * Creates a function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * * @func * @memberOf R * @since v0.8.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) * @param {Function} condition A predicate function * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * @see R.unless, R.when * @example * * var incCount = R.ifElse( * R.has('count'), * R.over(R.lensProp('count'), R.inc), * R.assoc('count', 1) * ); * incCount({}); //=> { count: 1 } * incCount({ count: 1 }); //=> { count: 2 } */ module.exports = _curry3(function ifElse(condition, onTrue, onFalse) { return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); } ); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appreply-co/mcp-appstore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server