mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 22:56:11 +03:00
37 lines
849 B
TypeScript
37 lines
849 B
TypeScript
|
// Loaded from https://deno.land/x/ramda@v0.27.2/source/equals.js
|
||
|
|
||
|
|
||
|
import _curry2 from './internal/_curry2.js';
|
||
|
import _equals from './internal/_equals.js';
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns `true` if its arguments are equivalent, `false` otherwise. Handles
|
||
|
* cyclical data structures.
|
||
|
*
|
||
|
* Dispatches symmetrically to the `equals` methods of both arguments, if
|
||
|
* present.
|
||
|
*
|
||
|
* @func
|
||
|
* @memberOf R
|
||
|
* @since v0.15.0
|
||
|
* @category Relation
|
||
|
* @sig a -> b -> Boolean
|
||
|
* @param {*} a
|
||
|
* @param {*} b
|
||
|
* @return {Boolean}
|
||
|
* @example
|
||
|
*
|
||
|
* R.equals(1, 1); //=> true
|
||
|
* R.equals(1, '1'); //=> false
|
||
|
* R.equals([1, 2, 3], [1, 2, 3]); //=> true
|
||
|
*
|
||
|
* const a = {}; a.v = a;
|
||
|
* const b = {}; b.v = b;
|
||
|
* R.equals(a, b); //=> true
|
||
|
*/
|
||
|
var equals = _curry2(function equals(a, b) {
|
||
|
return _equals(a, b, [], []);
|
||
|
});
|
||
|
export default equals;
|