Check deep equality of two variables
<script src="https://cdn.jsdelivr.net/npm/isdifferent@2.0.0/dist/isDifferent.iife.js"></script>
<script>
isDifferent.isDifferent('bar', 'foo') // true
isDifferent.isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false
</script>
<script type="module">
import { isDifferent } from 'https://cdn.jsdelivr.net/npm/isdifferent@2.0.0/dist/isDifferent.esm.min.js'
isDifferent('bar', 'foo') // true
isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false
</script>
npm i isdifferent
import { isDifferent } from 'isdifferent'
// or // const { isDifferent } = require('isdifferent')
isDifferent('bar', 'foo') // true
isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false