'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.e2 = undefined;

var _katsuCurry = require('katsu-curry');

/**
 * @method e2
 * @param {string} fn - a function name
 * @param {*} a - some parameter
 * @param {*} b - some parameter
 * @param {Object} x - an object
 * @returns {*}
 * @example
 * import {e2} from 'entrust'
 * const replace = e2(`replace`)
 * replace(`old`, `new`, `oldnew`) // newnew
 */
var e2 = exports.e2 = (0, _katsuCurry.curry)(function (fn, a, b, x) {
  return x[fn](a, b);
});