isdifferent
v2.0.1
Published
function that returns true if their two parameters are different
Downloads
12
Readme
isDifferent
Check deep equality of two variables
browser
script
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/isDifferent.iife.js"></script>
<script>
isDifferent.isDifferent('bar', 'foo') // true
isDifferent.isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false
</script>
module
<script type="module">
import { isDifferent } from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/isDifferent.esm.min.js'
isDifferent('bar', 'foo') // true
isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false
</script>
node (and browser with some bundler)
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