function checkIfMixinsAreEqual(nextScaleMixins, scaleMixins, hasTreeStructure) {
  const newMixins = {
    ...nextScaleMixins,
    _allData: hasTreeStructure
      ? cleanseData(nextScaleMixins._allData)
      : nextScaleMixins._allData
  };
  const oldMixins = {
    ...scaleMixins,
    _allData: hasTreeStructure
      ? cleanseData(scaleMixins._allData)
      : scaleMixins._allData
  };
  // it's hard to say if this function is reasonable?
  return equal(newMixins, oldMixins);
}
Wrapper on the deep-equal method for checking equality of next props vs current props
@param {Object} scaleMixins - Scale object.
@param {Object} nextScaleMixins - Scale object.
@param {Boolean} hasTreeStructure - Whether or not to cleanse the data of possible cyclic structures
@returns {Boolean} whether or not the two mixins objects are equal