How to use the is-equal/why function in is-equal

To help you get started, we’ve selected a few is-equal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / @sanity / form-builder / src / utils / ValueSync.ts View on Github external
checkDiff = debounce(() => {
      const propsVal = this.props.value
      const stateVal = this.state.value ? this.props.serialize(this.state.value) : this.state.value
      const notEqual = whyNotEqual(propsVal, stateVal)
      if (notEqual) {
        // eslint-disable-next-line no-console
        console.warn(
          'Serialized local input value (%o) out of sync with actual value (%o): %s',
          propsVal,
          stateVal,
          notEqual
        )
      }
    }, 5000)
github mjackson / expect / modules / TestUtils.js View on Github external
export const whyNotEqual = (a, b) =>
  (a == b ? '' : whyNotStrictlyEqual(a, b)) // eslint-disable-line eqeqeq

is-equal

Are these two values conceptually equal?

MIT
Latest version published 6 months ago

Package Health Score

64 / 100
Full package analysis

Popular is-equal functions