{"size": 924, "ext": "js", "max_stars_repo_path": "src/operators/ceq.js", "max_stars_repo_name": "Barandis/jsplus", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/operators/ceq.js", "max_issues_repo_name": "Barandis/jsplus", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/operators/ceq.js", "max_forks_repo_name": "Barandis/jsplus", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.6666666667, "max_line_length": 89, "alphanum_fraction": 0.6168831169}
// Copyright (c) 2021 Thomas J. Otterson
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT

const curry2 = require('functions/curry2')

/**
 * A curried function version of the `==` coercing equals operator.
 *
 * You *probably* mean to use `{@link module:operators.eq|eq}` instead.
 *
 * ```javascript
 * console.log(3 == '3')      // true
 * console.log(ceq (3) ('3')) // true
 *
 * const ceq3 = ceq (3)
 * console.log(ceq3 ('3'))    // true
 *
 * console.log(3 == 4)        // false
 * console.log(ceq (3) (4))   // false
 * console.log(ceq3 (4))      // false
 * ```
 *
 * @param {*} x The first parameter.
 * @param {*} y The second parameter.
 * @returns {boolean} Whether the two arguments are equal, with equality defined by `==`.
 * @alias module:operators.ceq
 */
function ceq(x, y) {
  // eslint-disable-next-line eqeqeq
  return x == y
}

module.exports = curry2(ceq)
