Skip to content
Permalink
9bfb9ba527
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Robert Brignull replace jest with ava
Latest commit 0347b72 May 4, 2020 History
0 contributors

Users who have contributed to this file

17 lines (13 sloc) 573 Bytes
'use strict'
const argumentsObject = require('./complexValues/arguments').tag
const constants = require('./constants')
const AMBIGUOUS = constants.AMBIGUOUS
const SHALLOW_EQUAL = constants.SHALLOW_EQUAL
function shouldCompareDeep (result, lhs, rhs) {
if (result === SHALLOW_EQUAL) return true
if (result !== AMBIGUOUS) return false
// Properties are only ambiguous if they have symbol keys. These properties
// must be compared in an order-insensitive manner.
return lhs.tag === argumentsObject || lhs.isProperty === true
}
module.exports = shouldCompareDeep