1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var tslib_1 = require("tslib");
|
4 | var is_function_1 = (0, tslib_1.__importDefault)(require("./is-function"));
|
5 | var is_equal_1 = (0, tslib_1.__importDefault)(require("./is-equal"));
|
6 | /**
|
7 | * @param {*} value The value to compare.
|
8 | * @param {*} other The other value to compare.
|
9 | * @param {Function} [fn] The function to customize comparisons.
|
10 | * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
11 | * @example
|
12 | *
|
13 | * function isGreeting(value) {
|
14 | * return /^h(?:i|ello)$/.test(value);
|
15 | * }
|
16 | *
|
17 | * function customizer(objValue, othValue) {
|
18 | * if (isGreeting(objValue) && isGreeting(othValue)) {
|
19 | * return true;
|
20 | * }
|
21 | * }
|
22 | *
|
23 | * var array = ['hello', 'goodbye'];
|
24 | * var other = ['hi', 'goodbye'];
|
25 | *
|
26 | * isEqualWith(array, other, customizer); // => true
|
27 | */
|
28 | exports.default = (function (value, other, fn) {
|
29 | if (!(0, is_function_1.default)(fn)) {
|
30 | return (0, is_equal_1.default)(value, other);
|
31 | }
|
32 | return !!fn(value, other);
|
33 | });
|
34 | //# sourceMappingURL=is-equal-with.js.map |
\ | No newline at end of file |